Hi All.

I recently decided it was time to upgrade my servlet based web-server. After
checking the
latest versions etc I went with Apache 1.3.20, Tomcat 3.2.3 and Cocoon
2.0b2. (I'm running
Windows NT).  I figured I'd get all the grief over with in one go! :-)

(For the record, I was previously running Apache JServ 1.1.2 & Cocoon 1.7.4)

After the expected problems working out the new configuration techniques,
moving and
tweaking servlets and editing XML, I got everything up and running pretty
well.

One new problem has appeared however, that my previous setup did not show.

I have a servlet (ServletA) that generates a URL as part of a generated web
page. It includes
a file path on the server, and the URL generated looks like this:

        http://myserver/context/servlet/ServletB/file/path/file.xyz

This URL directs another servlet (ServletB) to read the file
"file/path/file.xyz".  This all worked
just fine until ServletA found a file named "file/path/broken+.xyz" and
generated a URL with
a '+' sign in it..  ServletB calls getPathInfo() on this and gets
"file/path/broken .xyz" (+ replaced by space).

OK. No problem I thought, I have forgotten to escape the '+' to %2b when I
generate the URL.
Some quick servlet code changes later, I tried again.  Now the URL was
generated as:

        http://myserver/context/servlet/ServletB/file/path/broken%2b.xyz

But on the ServletB side getPathInfo() STILL returns "broken .xyz" (with the
damn space!)

I even tried double-escaping to:

    http://myserver/context/servlet/ServletB/file/path/broken%252b.xyz

but that apparently blew away Tomcats (or Apache's) URL pattern matching and
just returned
Error 404.

Anyone know whats going on here? It looks suspicously like something has
unescaped the path
information twice. Or am I getting confused about who whould escape that bad
file name?

 I found nothing similar in the mailing lists or Apache bug database.

Ross.

(Spam protected email return.....remove nospam)


Reply via email to