BUGS: URL vs file pathnames
Hello...
There are a number of obsolete files in the distribution. Should be torched. Mailman/Archiver.py Mailman/pipermail.py Mailman/HyperArch.py Mailman/HyperDatabase.py
Also, there is a general problem in the code with using os.path.join to construct URLs. A URL is NOT a file path. You don't want to use ":" or "\" if Mailman is run on a different platform. The os.path.join should go away and string concat should be used with "/".
HTMLFormatter.py: lines 96 and 299 MailList.py: 442 Cgi/admin.py: 220, 401 Cgi/archives.py: 72 Cgi/edithtml.py: 95, 161 Cgi/listinfo.py: 130 Archiver/Archiver.py: 118, 122
Also, line 101 of MailList.py has a hard-coded "/" rather than using os.path.join.
Finally: Archiver/Archiver.py:122 should have a trailing "/" on the public archive URL. The trailing slash prevents an internal redirection in Apache -- this screws me because it switches the hostname from a CNAME to the "real" hostname.
-g
-- Greg Stein, http://www.lyra.org/
On Sun, Nov 08, 1998 at 08:36:05PM -0800, Greg Stein wrote: | Hello... | | There are a number of obsolete files in the distribution. Should be | torched. | Mailman/Archiver.py | Mailman/pipermail.py | Mailman/HyperArch.py | Mailman/HyperDatabase.py |
running "make update" from the source should delete these. they're no longer in the source tree (at this location) either.
| Also, there is a general problem in the code with using os.path.join to | construct URLs. A URL is NOT a file path. You don't want to use ":" or | "\" if Mailman is run on a different platform. The os.path.join should | go away and string concat should be used with "/". | | HTMLFormatter.py: lines 96 and 299 | MailList.py: 442 | Cgi/admin.py: 220, 401 | Cgi/archives.py: 72 | Cgi/edithtml.py: 95, 161 | Cgi/listinfo.py: 130 | Archiver/Archiver.py: 118, 122
I'm working on fixing these now. | | Also, line 101 of MailList.py has a hard-coded "/" rather than using | os.path.join.
ditto. thx.
| Finally: Archiver/Archiver.py:122 should have a trailing "/" on the | public archive URL. The trailing slash prevents an internal redirection | in Apache -- this screws me because it switches the hostname from a | CNAME to the "real" hostname.
What sort of internal redirection?
scott
Scott wrote:
On Sun, Nov 08, 1998 at 08:36:05PM -0800, Greg Stein wrote: | Hello... | | There are a number of obsolete files in the distribution. Should be | torched. | Mailman/Archiver.py | Mailman/pipermail.py | Mailman/HyperArch.py | Mailman/HyperDatabase.py |
running "make update" from the source should delete these. they're no longer in the source tree (at this location) either.
Euh... I installed from scratch. Those files are in the tarball and/or install script (not left over from an updated install area). That just seems wrong.
... | Finally: Archiver/Archiver.py:122 should have a trailing "/" on the | public archive URL. The trailing slash prevents an internal redirection | in Apache -- this screws me because it switches the hostname from a | CNAME to the "real" hostname.
What sort of internal redirection?
If you send a request for a directory to Apache without a trailing "/", then it will append the "/" and do an "internal redirect". The result of this is that the browser will update the URL that it displays to the internal-redirect location. In my case, it lost the CNAME hostname and picked up the true name (undesirable). By appending the "/" on there, it doesn't do the redirect and everything is hunky-dory.
Heck, you could also argue that the patch is for improving web server performance :-)
Cheers, -g
-- Greg Stein, http://www.lyra.org/
"GS" == Greg Stein <gstein@lyra.org> writes:
GS> Also, there is a general problem in the code with using
GS> os.path.join to construct URLs. A URL is NOT a file path. You
GS> don't want to use ":" or "\" if Mailman is run on a different
GS> platform. The os.path.join should go away and string concat
GS> should be used with "/".
Shouldn't we be using urlparse.urljoin() for these?
-Barry
Barry A. Warsaw wrote:
"GS" == Greg Stein <gstein@lyra.org> writes:
GS> Also, there is a general problem in the code with using GS> os.path.join to construct URLs. A URL is NOT a file path. You GS> don't want to use ":" or "\" if Mailman is run on a different GS> platform. The os.path.join should go away and string concat GS> should be used with "/".
Shouldn't we be using urlparse.urljoin() for these?
-Barry
That would only be necessary if the second part is an unknown (possibly-absolute) URL. I wouldn't think it is necessary in this context.
-g
-- Greg Stein, http://www.lyra.org/
participants (3)
-
Barry A. Warsaw
-
Greg Stein
-
Scott