Skip to content
Snippets Groups Projects
Commit 32cd9b22 authored by Radko Krkoš's avatar Radko Krkoš
Browse files

Server: Fix grave misspelling of CONTENT_LENGTH wsgi variable (thx Honza Žerdík)

* Introduced in 5f2e50a0
* Caused the POST payload to be always ignored, breaking the function completely.
* Great job finding and debugging this, Honza Žerdík.
parent 51e080ce
No related branches found
No related tags found
No related merge requests found
......@@ -927,10 +927,10 @@ class Server(ObjectBase):
# preserve compatibility with clients deployed in the wild, which use POST for
# all requests (even those without payload, with no specified content length).
# According to PEP3333, section "Input and Error Streams", the application SHOULD
# NOT attempt to read more data than specified by CONTENT-LENGTH. As stated in
# section "environ Variables", CONTENT-LENGTH may be empty (string) or absent.
# NOT attempt to read more data than specified by CONTENT_LENGTH. As stated in
# section "environ Variables", CONTENT_LENGTH may be empty (string) or absent.
try:
content_length = int(environ.get('CONTENT-LENGTH', 0))
content_length = int(environ.get('CONTENT_LENGTH', 0))
except ValueError:
content_length = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment