From b4fcff0471e16b6dab3a685df970bca712c5cb3b Mon Sep 17 00:00:00 2001 From: Sri Sanketh Uppalapati Date: Sat, 12 Dec 2015 17:06:29 +0530 Subject: Update url.py --- pyramid/url.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3