diff options
author | Donald Stufft <donald@stufft.io> | 2013-06-08 20:47:37 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-06-08 20:47:37 -0400 |
commit | d88dee326977dc83ab777acd51df552924ae1380 (patch) | |
tree | bf8684961f4ff6427086d9ab4d45c4948536722a /pypi.wsgi | |
parent | 1661fcee8605f0de63f2e0cf41024ee5715d243e (diff) | |
download | decorator-d88dee326977dc83ab777acd51df552924ae1380.tar.gz |
Handle not having a CONTENT_LENGTH better
Diffstat (limited to 'pypi.wsgi')
-rw-r--r-- | pypi.wsgi | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -23,7 +23,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)) |