Re: [Mailman-Developers] Error in Mailman Version: 1.0rc1

[Richard Ellerbrock]
Apparently your web server isn't defining the HTTP_HOST environment variable when running CGI scripts. The CGI/1.1 spec says that SERVER_NAME should hold The server's hostname, DNS alias, or IP address as it would appear in self-referencing URLs" (but doesn't mention HTTP_HOST...), so with the below (just-checked-in) patch Mailman falls back on SERVER_NAME when HTTP_HOST is unset: Index: listinfo.py =================================================================== RCS file: /export/public/cvsroot/mailman/Mailman/Cgi/listinfo.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- listinfo.py 1999/05/02 22:57:45 1.10 +++ listinfo.py 1999/05/22 10:06:09 1.11 @@ -60,7 +60,8 @@ # 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: Thanks for the bug report, -- Harald
participants (1)
-
Harald Meland