diff options
author | ianb <devnull@localhost> | 2005-12-30 21:02:10 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2005-12-30 21:02:10 +0000 |
commit | a63503d08105918bb4494a8099a1d0b5b060be9e (patch) | |
tree | 222097d0efc67e2997373c712719010f2d8e6c2f /paste/wsgilib.py | |
parent | 16885c606db716833cfe887beda87ce774da5555 (diff) | |
download | paste-a63503d08105918bb4494a8099a1d0b5b060be9e.tar.gz |
Set HTTP_HOST in raw_interactive
Diffstat (limited to 'paste/wsgilib.py')
-rw-r--r-- | paste/wsgilib.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/paste/wsgilib.py b/paste/wsgilib.py index 4c02a02..da62c6f 100644 --- a/paste/wsgilib.py +++ b/paste/wsgilib.py @@ -190,6 +190,9 @@ def raw_interactive(application, path='', **environ): for name, value in environ.items(): name = name.replace('__', '.') basic_environ[name] = value + if ('SERVER_NAME' in basic_environ + and 'HTTP_HOST' not in basic_environ): + basic_environ['HTTP_HOST'] = basic_environ['SERVER_NAME'] istream = basic_environ['wsgi.input'] if isinstance(istream, str): basic_environ['wsgi.input'] = StringIO(istream) |