diff options
| -rw-r--r-- | .travis.yml | 3 | ||||
| -rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
| -rw-r--r-- | pyramid/url.py | 10 |
3 files changed, 9 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index 2163eb8fd..5c53b43f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,3 +36,6 @@ script: notifications: email: - pyramid-checkins@lists.repoze.org + irc: + channels: + - "chat.freenode.net#pyramid" diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 4edf1b4e9..1f3597e84 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -256,3 +256,5 @@ Contributors - Amos Latteier, 2015/10/22 - Rami Chousein, 2015/10/28 + +- Sri Sanketh Uppalapati, 2015/12/12 diff --git a/pyramid/url.py b/pyramid/url.py index b004c40ec..fd62f0057 100644 --- a/pyramid/url.py +++ b/pyramid/url.py @@ -96,19 +96,17 @@ class URLMethodsMixin(object): if scheme == 'http': if port is None: port = '80' - url = scheme + '://' - if port is not None: - port = str(port) if host is None: host = e.get('HTTP_HOST') - if host is None: - host = e['SERVER_NAME'] + if host is None: + host = e['SERVER_NAME'] if port is None: if ':' in host: host, port = host.split(':', 1) else: port = e['SERVER_PORT'] else: + port = str(port) if ':' in host: host, _ = host.split(':', 1) if scheme == 'https': @@ -117,7 +115,7 @@ class URLMethodsMixin(object): elif scheme == 'http': if port == '80': port = None - url += host + url = scheme + '://' + host if port: url += ':%s' % port |
