From 4f941e48519edca8dba1e67ef9bab63028f430ed Mon Sep 17 00:00:00 2001 From: hmeland Date: Sat, 22 May 1999 10:06:09 +0000 Subject: 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. --- Mailman/Cgi/listinfo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- cgit v1.3.1