summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/asynchronous.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2008-07-09 21:27:38 +0200
committerHelmut Grohne <helmut@subdivi.de>2008-07-09 21:27:38 +0200
commit37c1ac9cb22e364ffafbc730a311b1d271f97522 (patch)
tree89f4fa128913e8e3ead16ead0a2a89cb23090c35 /wsgitools/scgi/asynchronous.py
parent5c89564f6a2983b65f136fcfe1bc78530b528358 (diff)
downloadwsgitools-37c1ac9cb22e364ffafbc730a311b1d271f97522.tar.gz
check for whether environ contains CONTENT_LENGTH
Diffstat (limited to 'wsgitools/scgi/asynchronous.py')
-rw-r--r--wsgitools/scgi/asynchronous.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py
index 4b1ed8f..5d0e43d 100644
--- a/wsgitools/scgi/asynchronous.py
+++ b/wsgitools/scgi/asynchronous.py
@@ -101,6 +101,9 @@ class SCGIConnection(asyncore.dispatcher):
if self.reqlen == 0:
if self.inbuff.startswith(','):
self.inbuff = self.inbuff[1:]
+ if not self.environ.get("CONTENT_LENGTH", "bad").isdigit():
+ self.close()
+ return
self.reqlen = long(self.environ["CONTENT_LENGTH"])
if self.reqlen > self.MAX_POST_SIZE:
self.close()