diff options
author | ianb <devnull@localhost> | 2008-07-30 17:44:01 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2008-07-30 17:44:01 +0000 |
commit | f1f5f30462c5d317d3dbd0b01e9f567964c4e986 (patch) | |
tree | d5a46fac09020a34ee7e04bd042175367ed72d45 /paste/proxy.py | |
parent | c0ff7f4dba55d60bdea88efefd1b3b92f217d4f9 (diff) | |
download | paste-f1f5f30462c5d317d3dbd0b01e9f567964c4e986.tar.gz |
In proxy, set content-length and filter more bad headers
Diffstat (limited to 'paste/proxy.py')
-rw-r--r-- | paste/proxy.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/paste/proxy.py b/paste/proxy.py index 8972f58..e9a8749 100644 --- a/paste/proxy.py +++ b/paste/proxy.py @@ -39,7 +39,14 @@ from paste.util.converters import aslist # Remove these headers from response (specify lower case header # names): filtered_headers = ( - 'transfer-encoding', + 'transfer-encoding', + 'connection', + 'keep-alive', + 'proxy-authenticate', + 'proxy-authorization', + 'te', + 'trailers', + 'upgrade', ) class Proxy(object): @@ -83,6 +90,7 @@ class Proxy(object): if environ.get('CONTENT_TYPE'): headers['content-type'] = environ['CONTENT_TYPE'] if environ.get('CONTENT_LENGTH'): + headers['content-length'] = environ['CONTENT_LENGTH'] length = int(environ['CONTENT_LENGTH']) body = environ['wsgi.input'].read(length) else: |