summaryrefslogtreecommitdiff
path: root/paste/httpserver.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2007-04-15 17:33:52 +0000
committerianb <devnull@localhost>2007-04-15 17:33:52 +0000
commit9a1dd5334fed7464bac390dc8f79aa22d52773f1 (patch)
treea9ee7c47ccd6eadd20a2e8efc13309f72d517a9d /paste/httpserver.py
parent14646c9de1eea8ff96d02a66437bf2a75df35ea7 (diff)
downloadpaste-9a1dd5334fed7464bac390dc8f79aa22d52773f1.tar.gz
Add information about proxy requests
Diffstat (limited to 'paste/httpserver.py')
-rwxr-xr-xpaste/httpserver.py6
1 files changed, 5 insertions, 1 deletions
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