[ mailman-Patches-912448 ] Config setting to force relative URLs

Patches item #912448, was opened at 2004-03-09 02:57 Message generated for change (Comment added) made by kostecke You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300103&aid=912448&group_id=103 Category: None Group: Mailman 2.1
Status: Deleted Resolution: None Priority: 5 Submitted By: Steve Kostecke (kostecke) Assigned to: Nobody/Anonymous (nobody) Summary: Config setting to force relative URLs
Initial Comment: 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.get('SCRIPT_NAME', '') + os.environ.get('PATH_INFO', '') baseurl = urlparse.urlparse(web_page_url)[2] - if not absolute and fullpath.endswith(baseurl): + if mm_cfg.RELATIVE_URLS or not absolute and fullpath.endswith(baseurl): # Use relative addressing fullpath = fullpath[len(baseurl):] 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_member_moderation. DEFAULT_NEW_MEMBER_OPTIONS = 256 +# Set this to 1 to enable relative URLs. +RELATIVE_URLS = 0 ##### # List defaults. NOTE: Changing these values does NOT change the </pre> ----------------------------------------------------------------------
Comment By: Steve Kostecke (kostecke) Date: 2004-03-13 04:27
Message: Logged In: YES user_id=926494 I'm withdrawing this patch until I can fix it. ---------------------------------------------------------------------- Comment By: Multitalents (multitalents) Date: 2004-03-10 05:38 Message: 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? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300103&aid=912448&group_id=103
participants (1)
-
SourceForge.net