diff options
author | ianb <devnull@localhost> | 2007-10-22 16:25:29 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2007-10-22 16:25:29 +0000 |
commit | cb91909c0121fc5104ad3b96c7d4e71e8289a864 (patch) | |
tree | 5c9f08e2a02e0c6e816f39e958b229222f3e21a6 /paste/cascade.py | |
parent | f64031047161acdf1f6e8aab5b1f4958268d3605 (diff) | |
download | paste-cb91909c0121fc5104ad3b96c7d4e71e8289a864.tar.gz |
be more tolerant of bad CONTENT_LENGTH1.5.1
Diffstat (limited to 'paste/cascade.py')
-rw-r--r-- | paste/cascade.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/paste/cascade.py b/paste/cascade.py index d939e4a..adb0907 100644 --- a/paste/cascade.py +++ b/paste/cascade.py @@ -76,7 +76,10 @@ class Cascade(object): return _consuming_writer return start_response(status, headers, exc_info) - length = int(environ.get('CONTENT_LENGTH', '0')) + try: + length = int(environ.get('CONTENT_LENGTH', 0) or 0) + except ValueError: + length = 0 if length > 0: # We have to copy wsgi.input copy_wsgi_input = True |