diff options
| author | ianb <devnull@localhost> | 2007-04-25 21:17:17 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2007-04-25 21:17:17 +0000 |
| commit | bf36d220557ee3341b51945234948f437afdd336 (patch) | |
| tree | 2243159fe1be75473ea557c1c5460b60618d39bc | |
| parent | 71848c27519d8f0df50de8526c7812d2bdf33509 (diff) | |
| download | paste-bf36d220557ee3341b51945234948f437afdd336.tar.gz | |
Treat missing Content-Length as 0, not unlimited
| -rw-r--r-- | docs/news.txt | 4 | ||||
| -rw-r--r-- | paste/proxy.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/docs/news.txt b/docs/news.txt index 14ceec0..40b980b 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -38,7 +38,9 @@ svn trunk port (e.g., port 80 for ``http``). * ``paste.proxy`` works with headers with continuations in the - response (i.e., a header that spans multiple lines). + response (i.e., a header that spans multiple lines). Also, treat a + missing Content-Length as 0, not unlimited (may have caused freeze ups for + some kinds of requests before). 1.3 --- diff --git a/paste/proxy.py b/paste/proxy.py index faed5a7..11b4cef 100644 --- a/paste/proxy.py +++ b/paste/proxy.py @@ -202,8 +202,8 @@ class TransparentProxy(object): length = int(environ['CONTENT_LENGTH']) body = environ['wsgi.input'].read(length) elif 'CONTENT_LENGTH' not in environ: - body = environ['wsgi.input'].read() - length = len(body) + body = '' + length = 0 else: body = '' length = 0 |
