Config setting to force relative URLs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Mailman 2.1.1 uses absolute URLs for all references to
mailing lists. This behavior may be useful when one
Mailman installation runs lists on multiple virtual
hosts. However, this behavior reduces the flexibility
of Mailman by making it impossible to use Mailman in
configurations where you need to be able to use
different hostnames to refer to the same lists (e.g.
where HTTP and HTTPS use different virtual hosts).
This patch modifies the ScriptURL function in
./Mailman/Utils.py to allow relative URLs to be forced
by setting a mm_cfg configuration variable:
RELATIVE_URLS. This patch also modifies Defaults.py to
provide the default value for RELATIVE_URLS.
<pre>
--- Utils.py.orig Tue Mar 9 02:45:20 2004
+++ Utils.py Tue Mar 9 02:10:51 2004
@@ -238,7 +238,7 @@
fullpath = os.environ.
baseurl = urlparse.
- if not absolute and fullpath.
+ if mm_cfg.
fullpath.
# Use relative addressing
fullpath = fullpath[
i = fullpath.find('?')
--- Defaults.py.orig Tue Mar 9 02:44:44 2004
+++ Defaults.py Tue Mar 9 02:15:13 2004
@@ -782,6 +782,9 @@
# list's config variable default_
DEFAULT_
+# Set this to 1 to enable relative URLs.
+RELATIVE_URLS = 0
#####
# List defaults. NOTE: Changing these values does NOT
change the
</pre>
Logged In: YES
user_id=994460
Your patch seems to be fine for the web interface but it
breaks the URLs in e-mail notifications. Relative URLs
are worthless in e-mails. Any ideas on how to fix this?