diff options
| author | bwarsaw | 2000-08-01 21:55:52 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-08-01 21:55:52 +0000 |
| commit | dac71163d82b6d990152adc7038b21e013071c92 (patch) | |
| tree | fd9ecb74bca674026b001d0f35169b09e3847931 /Mailman/MailCommandHandler.py | |
| parent | b20df5635aaa0d1740b9f827d3b018685c46e699 (diff) | |
| download | mailman-dac71163d82b6d990152adc7038b21e013071c92.tar.gz mailman-dac71163d82b6d990152adc7038b21e013071c92.tar.zst mailman-dac71163d82b6d990152adc7038b21e013071c92.zip | |
Massive cleanup to fix relative/absolute script url calculation in
response to SF Bug #110753. Specifically,
GetNestingLevel(): removed
ScriptURL(): New utility function to calculate relative and absolute
urls. The basic approach is this:
1. figure out where we are by using REQUEST_URI or
SCRIPTNAME+PATH_INFO if that isn't defined in our environment.
2. figure out what the Mailman base url is by taking the `path'
component of a urlparse() of the list's web_page_url configvar
or DEFAULT_URL if that isn't provided in the arguments.
3. calculate what the relative path is from where we are to
baseurl; express this as a string of ../'s
4. tack on the relative url to where we want to go, i.e. the
target
Elaborations: Optional `absolute' if set always calculates the
absolute url as web_page_url/DEFAULT_URL + target. absolute should
only be set when generating urls for emails.
mm_cfg.CGIEXT is always tacked onto the end, meaning target is
supposed to be just the script name and nothing else (anything else
should be concatenated onto the return value of this function).
Diffstat (limited to 'Mailman/MailCommandHandler.py')
0 files changed, 0 insertions, 0 deletions
