summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/forkpool.py
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools/scgi/forkpool.py')
-rw-r--r--wsgitools/scgi/forkpool.py4
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),