summaryrefslogtreecommitdiff
path: root/paste/httpserver.py
diff options
context:
space:
mode:
authorbbangert <devnull@localhost>2006-05-12 23:02:58 +0000
committerbbangert <devnull@localhost>2006-05-12 23:02:58 +0000
commit7a6f707850679b3b559d6609c7d428f1c3084500 (patch)
tree0ba2c8ec667b07539c34e26782f490b57dd1c581 /paste/httpserver.py
parent82b170ea9a75b0f4370d4f07a2c6b03da7d39bff (diff)
downloadpaste-7a6f707850679b3b559d6609c7d428f1c3084500.tar.gz
Paste HTTP Server was destroy duplicate HTTP headers rather than properly combining them according to http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
Diffstat (limited to 'paste/httpserver.py')
-rwxr-xr-xpaste/httpserver.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/paste/httpserver.py b/paste/httpserver.py
index 8c07233..4947fe5 100755
--- a/paste/httpserver.py
+++ b/paste/httpserver.py
@@ -186,13 +186,14 @@ class WSGIHandlerMixin:
,'REMOTE_ADDR': self.client_address[0]
,'REMOTE_HOST': self.address_string()
}
-
+
for k,v in self.headers.items():
- k = 'HTTP_' + k.replace("-","_").upper()
- if k in ('HTTP_CONTENT_TYPE','HTTP_CONTENT_LENGTH'):
+ key = 'HTTP_' + k.replace("-","_").upper()
+ if key in ('HTTP_CONTENT_TYPE','HTTP_CONTENT_LENGTH'):
continue
- self.wsgi_environ[k] = v
-
+ print k, key
+ self.wsgi_environ[key] = ','.join(self.headers.getheaders(k))
+
if hasattr(self.connection,'get_context'):
self.wsgi_environ['wsgi.url_scheme'] = 'https'
# @@: extract other SSL parameters from pyOpenSSL at...