From 9a1dd5334fed7464bac390dc8f79aa22d52773f1 Mon Sep 17 00:00:00 2001 From: ianb Date: Sun, 15 Apr 2007 17:33:52 +0000 Subject: Add information about proxy requests --- paste/httpserver.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'paste/httpserver.py') diff --git a/paste/httpserver.py b/paste/httpserver.py index 29c2065..d7dc190 100755 --- a/paste/httpserver.py +++ b/paste/httpserver.py @@ -176,7 +176,7 @@ class WSGIHandlerMixin: argument can be used to override any settings. """ - (_, _, path, query, fragment) = urlparse.urlsplit(self.path) + (scheme, netloc, path, query, fragment) = urlparse.urlsplit(self.path) path = urllib.unquote(path) endslash = path.endswith('/') path = posixpath.normpath(path) @@ -224,6 +224,10 @@ class WSGIHandlerMixin: # CGI not required by PEP-333 ,'REMOTE_ADDR': remote_address } + if scheme: + self.wsgi_environ['paste.httpserver.proxy.scheme'] = scheme + if netloc: + self.wsgi_environ['paste.httpserver.proxy.host'] = netloc if self.lookup_addresses: # @@: make lookup_addreses actually work, at this point -- cgit v1.2.1