FAQ
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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/mailman-users/attachments/20081229/a01c5101/attachment.pgp>

Search Discussions

  • Mark Sapiro at Dec 30, 2008 at 12:26 am

    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
  • Dennis Putnam at Jan 1, 2009 at 7:54 pm
    Hi Mark,

    Thanks. I added the patch but is there a config parameter I need to set
    to make it work? If not I cannot see any difference.

    Mark Sapiro wrote:
    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('?')


    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: signature.asc
    Type: application/pgp-signature
    Size: 258 bytes
    Desc: OpenPGP digital signature
    URL: <http://mail.python.org/pipermail/mailman-users/attachments/20090101/0c945620/attachment.pgp>
  • Mark Sapiro at Jan 1, 2009 at 10:56 pm

    Dennis Putnam wrote:
    Thanks. I added the patch but is there a config parameter I need to set
    to make it work? If not I cannot see any difference.

    What are you looking at? You have to look at the raw HTML (page source)
    delivered to the browser to see a difference.

    In practical terms, there's not going to be a difference in the HTTP
    interaction between the browser and the server.
    Mark Sapiro wrote:
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedDec 29, '08 at 9:52p
activeJan 1, '09 at 10:56p
posts4
users2
websitelist.org

2 users in discussion

Mark Sapiro: 2 posts Dennis Putnam: 2 posts

People

Translate

site design / logo © 2022 Grokbase