DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=20036>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=20036
Trailing Dots stripped from PATH_INFO environment variable
------- Additional Comments From kerry@lothrop.de 2004-10-07 12:11 -------
The problem also strips off trailing dots from any path element:
For example, if I call
http://localhost/cgi-bin/test.exe/test./test./
PATH_INFO is only set to
/test/test/
The same applies to PATH_TRANSLATED. In the source, I found the following in
function apr_filepath_merge (filepath.c:626):
/* Truncate all trailing spaces and all but the first two dots */
segend = seglen;
while (seglen && (addpath[seglen - 1] == ' '
|| addpath[seglen - 1] == '.')) {
if (seglen > 2 || addpath[seglen - 1] != '.' || addpath[0] != '.')
--seglen;
else
break;
}
So the stipping of trailing dots seems to be intentional for some reason, yet it
was surely written for real file names, not additional information provided for
the PATH_INFO variable.
As a workaround, I am now using REQUEST_URI and stripping/decoding it
appropriately, yet I still think this is a bug in Apache.
The problem is still around in Apache 2.0.52, only on Win32, Netware and OS/2.
Kerry W. Lothrop
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
|