Bugzilla – Bug 2704
Last modified: 2002-01-23 18:49:03 CET
There are discrepancies in the usage of id->raw_url in configurations that
aren't mounted on /. Its documentation states:
//! The nonparsed, nontouched, non-* URL requested by the client.
//! Hence, this path is unlike <ref>not_query</ref> and
//! <ref>virtfile</ref> not relative to the server URL and must be
//! used in conjunction with the former to generate absolute paths
//! within the server. Be aware that this string will contain any
//! URL variables present in the request as well as the file path.
It's not completely clear, but I interpret this as follows: If
"http://datan/foo/bar.html" is requested and the configuration port is
"http://*/foo", it will contain "/foo/bar.html" and not "/bar.html".
However, the code in protocols/http.pike specifically strips the
configuration path prefix from it (as well as from id->not_query).
Then again, some modules use id->raw_url to generate an absolute url, e.g.
sscanf(global_not_query, "%s?", global_not_query);
This will generate urls to "/bar.html" when <foldlist> is used in the
example page above.
So the question is: Is the bug in protocols.pike or in foldlist.pike (and
probably other modules)? In either case, the docstring for raw_url should
(The problem also exist in 2.1 and 2.2.)
It's worth noting that the code in foldlist came about as a fix for the server
url stripping made in id->not_query:
lister:~/Roxen/devel/server/modules/tags> cvs log foldlist.pike
date: 2000/08/15 23:08:50; author: nilsson; state: Exp; lines: +5 -2
Now also works when using a virtual server mounted in another virtual server
lister:~/Roxen/devel/server/modules/tags> cvs diff -ur 1.21 -r 1.22
RCS file: /cvs/Roxen/2.4/server/modules/tags/foldlist.pike,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- foldlist.pike 2000/05/03 14:47:12 1.21
+++ foldlist.pike 2000/08/15 23:08:50 1.22
@@ -1,7 +1,7 @@
// This is a roxen module. Copyright © 1999-2000, Roxen IS.
-constant cvs_version = "$Id: foldlist.pike,v 1.21 2000/05/03 14:47:12 nilsson
+constant cvs_version = "$Id: foldlist.pike,v 1.22 2000/08/15 23:08:50 nilsson
@@ -82,7 +82,10 @@
// return id->not_query+"?"+id->query+"&state="+
- return id->not_query+"?state="+
+ string global_not_query=id->raw_url;
+ sscanf(global_not_query, "%s?", global_not_query);
+ return global_not_query+"?state="+
That indicates either that id->raw_url wasn't modified when this change was
made, or that Nilsson didn't test the fix.
Btw, [bug 2247] and [bug 2702] are a bit related to this one.
You need to
before you can comment on or make changes to this bug.