Using Apache 1.3.19 here's what I see.  Apache does normalize the URL but
there is a small difference between what it does and what Tomcat does.
Apache does not remove multiple adjacent / characters.  For example,

http://server/cgi-bin/script/fu/bar --> PATH_INFO = /fu/bar
http://server/cgi-bin/script/fu/../bar --> PATH_INFO = /bar
http://server/cgi-bin/script/fu//bar --> PATH_INFO = /fu//bar

The multiple adjacent / characters don't seem to have any effect on locating
resources.  For example,

http://server///////cgi-bin/script/fu/bar

works just fine.  Unless other comitters feel otherwise, I'll work on
changes to the tomcat_32 branch to make path info work as it does with CGI
in Apache.

Another difference is that the REQUEST_URI CGI variable is the original
non-normalized URI, but Tomcat's getRequestURI() now returns the normalized
version.  I'm still waiting to hear back from the servlet expert group about
whether the normalization plans are going into the specification.

Marc Saegesser

> -----Original Message-----
> From: Jason Hunter [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 27, 2001 12:25 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Tomcat 3.2.3 and getPathInfo
>
> So what does the Apache Web Server do for PATH_INFO on a request to
> http://foo.com/cgi-bin/somecgi/http://extra.com?
>
> -jh-

Reply via email to