diff options
author | Helmut Grohne <helmut@subdivi.de> | 2008-07-09 21:27:38 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2008-07-09 21:27:38 +0200 |
commit | 37c1ac9cb22e364ffafbc730a311b1d271f97522 (patch) | |
tree | 89f4fa128913e8e3ead16ead0a2a89cb23090c35 /wsgitools/scgi/forkpool.py | |
parent | 5c89564f6a2983b65f136fcfe1bc78530b528358 (diff) | |
download | wsgitools-37c1ac9cb22e364ffafbc730a311b1d271f97522.tar.gz |
check for whether environ contains CONTENT_LENGTH
Diffstat (limited to 'wsgitools/scgi/forkpool.py')
-rw-r--r-- | wsgitools/scgi/forkpool.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py index 01e544f..3597f08 100644 --- a/wsgitools/scgi/forkpool.py +++ b/wsgitools/scgi/forkpool.py @@ -318,6 +318,10 @@ class SCGIServer: '\r\n'.join(map("%s: %s".__mod__, headers)))) return dumbsend + if not environ.get("CONTENT_LENGTH", "bad").isdigit(): + con.close() + return + sfw = SocketFileWrapper(con, long(environ["CONTENT_LENGTH"])) environ.update({ "wsgi.version": (1, 0), |