Utils.ScriptURL() doesn't generate relative URLs

Bug #266231 reported by Dwpoon
2
Affects Status Importance Assigned to Milestone
GNU Mailman
New
Medium
Unassigned

Bug Description

In Utils.py, function ScriptURL takes a boolean
argument called "absolute". When it's False, the
function is supposed to return the target URL relative
to the URL of the currently executing CGI. However, a
logic bug prevents it from doing that.

See the attached patch for the correction. (Patch is
against version 2.1.6rc3.)

Explanation:
fullpath is the URL-path of the current CGI, e.g.
'/mailman/create'.
baseurl is something like '/mailman/'.
Therefore, it makes sense to return a relative URL
whenever fullpath STARTSwith baseurl.

This fix is important because without the ability to
generate relative URLs, the UI will always tend towards
using HTTP or HTTPS (whichever happens to be specified
in web_page_url). It would be nice if it would
continue using whichever protocol was already in use.

[http://sourceforge.net/tracker/index.php?func=detail&aid=1196085&group_id=103&atid=100103]

Tags: web-cgi
Revision history for this message
Dwpoon (dwpoon) wrote :
Revision history for this message
Dwpoon (dwpoon) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.