[Mailman-Users] Relative Admin URLs

Mark Sapiro mark at msapiro.net
Tue Dec 30 01:26:50 CET 2008

Dennis Putnam wrote:
>I read some threads on producing relative URLs for the admin pages but
>it seemed like there is a bug/hole and I did not find any closure on it.
>Has that issue been resolved and if so how do I configure mailman to
>generate relative URLs rather than absolute? Thanks.

It's a bug. It has not been fixed to date, but it will be for the next
release. The following patch will fix it.

=== modified file 'Mailman/Utils.py'
--- Mailman/Utils.py    2008-12-05 23:08:41 +0000
+++ Mailman/Utils.py    2008-12-30 00:23:28 +0000
@@ -266,7 +266,7 @@
         fullpath = os.environ.get('SCRIPT_NAME', '') + \
                    os.environ.get('PATH_INFO', '')
     baseurl = urlparse.urlparse(web_page_url)[2]
-    if not absolute and fullpath.endswith(baseurl):
+    if not absolute and fullpath.startswith(baseurl):
         # Use relative addressing
         fullpath = fullpath[len(baseurl):]
         i = fullpath.find('?')

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list