summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhmeland1999-05-22 10:06:09 +0000
committerhmeland1999-05-22 10:06:09 +0000
commit4f941e48519edca8dba1e67ef9bab63028f430ed (patch)
treeb5c0b7dba30bc2062b1f706b416e860910c40098
parentff4e4557e2ca2d17308c404de75adf9bdbf3d42f (diff)
downloadmailman-4f941e48519edca8dba1e67ef9bab63028f430ed.tar.gz
mailman-4f941e48519edca8dba1e67ef9bab63028f430ed.tar.zst
mailman-4f941e48519edca8dba1e67ef9bab63028f430ed.zip
FormatListinfoOverview(): The CGI/1.1 spec defines the SERVER_NAME
envvar, but not HTTP_HOST. Thus, if HTTP_HOST is unset, try getting SERVER_NAME.
-rw-r--r--Mailman/Cgi/listinfo.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py
index f4c7ba215..0aea64474 100644
--- a/Mailman/Cgi/listinfo.py
+++ b/Mailman/Cgi/listinfo.py
@@ -60,7 +60,8 @@ def FormatListinfoOverview(error=None):
# XXX We need a portable way to determine the host by which we are being
# visited! An absolute URL would do...
- http_host = os.environ.get('HTTP_HOST')
+ http_host = os.environ.get('HTTP_HOST') or\
+ os.environ.get('SERVER_NAME')
port = os.environ.get('SERVER_PORT')
# strip off the port if there is one
if port and http_host[-len(port)-1:] == ':'+port: