summaryrefslogtreecommitdiff
path: root/paste/httpserver.py
diff options
context:
space:
mode:
authorIan Bicking <ian@ianbicking.org>2007-04-15 17:33:52 +0000
committerIan Bicking <ian@ianbicking.org>2007-04-15 17:33:52 +0000
commitd3f359da4e792578ad2a6496fd54306a222404d0 (patch)
treea9ee7c47ccd6eadd20a2e8efc13309f72d517a9d /paste/httpserver.py
parent97fca1604413bcb433cb903c11ba0b764cba5df8 (diff)
downloadpaste-git-d3f359da4e792578ad2a6496fd54306a222404d0.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