diff options
author | Roland Hedberg <roland.hedberg@adm.umu.se> | 2013-05-24 11:44:16 +0200 |
---|---|---|
committer | Roland Hedberg <roland.hedberg@adm.umu.se> | 2013-05-24 11:44:16 +0200 |
commit | ad4c3382302f80c9104d70fa7eaeb0fdbcc08cbc (patch) | |
tree | 0b5b7558c13020f2b81f14f959990f6819297c3b /src/saml2/httputil.py | |
parent | 26227e0563ae5b07575d71a67884d59d6be61fa7 (diff) | |
download | pysaml2-ad4c3382302f80c9104d70fa7eaeb0fdbcc08cbc.tar.gz |
Not completely clear of which of HOST_NAME or SERVER_NAME is correct to use.
Diffstat (limited to 'src/saml2/httputil.py')
-rw-r--r-- | src/saml2/httputil.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/saml2/httputil.py b/src/saml2/httputil.py index 78620895..ae672e44 100644 --- a/src/saml2/httputil.py +++ b/src/saml2/httputil.py @@ -162,6 +162,8 @@ def geturl(environ, query=True, path=True): """ url = [environ['wsgi.url_scheme'] + '://'] if environ.get('SERVER_NAME'): + url.append(environ['HTTP_HOST']) + else: url.append(environ['SERVER_NAME']) if environ['wsgi.url_scheme'] == 'https': if environ['SERVER_PORT'] != '443': @@ -169,8 +171,6 @@ def geturl(environ, query=True, path=True): else: if environ['SERVER_PORT'] != '80': url.append(':' + environ['SERVER_PORT']) - else: - url.append(environ['HTTP_HOST']) if path: url.append(getpath(environ)) if query and environ.get('QUERY_STRING'): |