diff options
author | Donald Stufft <donald@stufft.io> | 2013-06-17 20:34:07 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-06-17 20:34:07 -0400 |
commit | d4a0324e56e806d7f70757f8c0936033901a6619 (patch) | |
tree | 45da5c365f7d0f0027ac5f023988e70d741b1175 | |
parent | aff07113c9ebc797b0d5601eb3a6908eb7c7acb1 (diff) | |
download | decorator-d4a0324e56e806d7f70757f8c0936033901a6619.tar.gz |
Handle a missing CONTENT_LENGTH
-rw-r--r-- | pypi.wsgi | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) |