summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-06-17 20:34:07 -0400
committerDonald Stufft <donald@stufft.io>2013-06-17 20:34:07 -0400
commitd4a0324e56e806d7f70757f8c0936033901a6619 (patch)
tree45da5c365f7d0f0027ac5f023988e70d741b1175
parentaff07113c9ebc797b0d5601eb3a6908eb7c7acb1 (diff)
downloaddecorator-d4a0324e56e806d7f70757f8c0936033901a6619.tar.gz
Handle a missing CONTENT_LENGTH
-rw-r--r--pypi.wsgi2
1 files changed, 1 insertions, 1 deletions
diff --git a/pypi.wsgi b/pypi.wsgi
index aa33e79..c144b5e 100644
--- a/pypi.wsgi
+++ b/pypi.wsgi
@@ -20,7 +20,7 @@ class Request:
def __init__(self, environ, start_response):
self.start_response = start_response
try:
- length = int(environ['CONTENT_LENGTH'])
+ length = int(environ.get('CONTENT_LENGTH', 0))
except ValueError:
length = 0
self.rfile = cStringIO.StringIO(environ['wsgi.input'].read(length))