[Mailman-Developers] ScriptURL with aolserver
Ellen Spertus
spertus@mills.edu
Sat, 15 Dec 2001 22:23:58 -0800
I think I've figured out what's behind the problems with links from
administration pages that some users have reported
[http://sourceforge.net/tracker/?group_id=103&atid=100103&func=detail&aid=214037
and
http://sourceforge.net/tracker/?group_id=103&atid=100103&func=detail&aid=452200].
For an example of the problem, see
http://javamlm.mills.edu/mailman/admin/test/ and try following any link.
I am using aolserver 3.2, which seems to set nonstandard values for the
environment variables SCRIPT_NAME and PATH_INFO. When I do a GET on
"http://javamlm.mills.edu/mailman/admin/test", the values are:
SCRIPT_NAME: /mailman/admin/test
PATH_INFO: /test
When Utils.ScriptURL concatenates these, the result is the bogus fullpath
"/mailman/admin/test/test", which leads to the bogus relative path
"../../../admin".
Workarounds:
- Use a behaving web server
- Use absolute URLs [which would probably break something else], e.g.,
- change MailList.GetScriptURL
- change Utils.ScriptURL
- Have a special case for noncompliant web servers
- require a flag for aolserver users
- infer that something's wrong if SCRIPT_NAME and PATH_INFO end in the
same string
I'd be happy to code a patch but could use advice on the best way to
proceed without breaking something else (or perhaps people don't care about
supporting aolserver). I've also sent a query to the aolserver discussion
list asking whether the behavior is a bug or a feature.
Ellen