summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyramid/url.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyramid/url.py b/pyramid/url.py
index 812514638..fd62f0057 100644
--- a/pyramid/url.py
+++ b/pyramid/url.py
@@ -98,6 +98,8 @@ class URLMethodsMixin(object):
port = '80'
if host is None:
host = e.get('HTTP_HOST')
+ if host is None:
+ host = e['SERVER_NAME']
if port is None:
if ':' in host:
host, port = host.split(':', 1)