mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Get CONTENT_LENGTH as it may be absent
This commit is contained in:
parent
0202756540
commit
421189e263
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ class Application(object):
|
||||||
log.LOGGER.debug("Request headers:\n%s" % environ.items())
|
log.LOGGER.debug("Request headers:\n%s" % environ.items())
|
||||||
|
|
||||||
# Get content
|
# Get content
|
||||||
content_length = int(environ["CONTENT_LENGTH"] or 0)
|
content_length = int(environ.get("CONTENT_LENGTH", 0))
|
||||||
if content_length:
|
if content_length:
|
||||||
content = self.decode(
|
content = self.decode(
|
||||||
environ["wsgi.input"].read(content_length), environ)
|
environ["wsgi.input"].read(content_length), environ)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue