diff options
-rw-r--r-- | paste/proxy.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/paste/proxy.py b/paste/proxy.py index cb29c54..155128f 100644 --- a/paste/proxy.py +++ b/paste/proxy.py @@ -216,6 +216,8 @@ class TransparentProxy(object): if environ.get('CONTENT_LENGTH'): length = int(environ['CONTENT_LENGTH']) body = environ['wsgi.input'].read(length) + if length == -1: + environ['CONTENT_LENGTH'] = str(len(body)) elif 'CONTENT_LENGTH' not in environ: body = '' length = 0 |