On Wed, Sep 17, 2008 at 1:45 PM, Johnny Kewl <[EMAIL PROTECTED]> wrote:
> > ----- Original Message ----- From: "Erik Onnen" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <users@tomcat.apache.org> > Sent: Wednesday, September 17, 2008 10:27 PM > Subject: Re: URLEncoding of "\" Character > > > Thanks Mark, much appreciated. I had no idea the extra system props even >> existed. >> >> On Wed, Sep 17, 2008 at 12:07 PM, Mark Thomas <[EMAIL PROTECTED]> wrote: >> >> Erik Onnen wrote: >>> > Verified on 6.0.16 and 6.0.18, 2.6.24 Linux kernel, JVM 1.6.0_10-beta. >>> When >>> > I attempt to encode a "\" character into a url resulting in a %5C in > >>> the >>> URL >>> > on the wire, I'm seeing a 400 from the server and none of my code is > >>> hit. >>> > I've tried URLEncoding="UTF-8" on the connector with no luck. Same URL >>> > serves fine on Jetty6. Other encoded, non-URL safe chars seem to work >>> fine. >>> > >>> > A sample of the URL on the wire looks like: >>> > >>> > GET /people/s%5Clash >>> >> > Erik... why does this happen? > Trying to understand why you end up with this url? > Why cant you just turn it into this? > /people/s/lash Well, for one the HTTP specification says that's an illegal URI. I prefer to follow the spec and encode my URIs explicitly in the markup that I send down to the Agent. The browser will encode the URI before sending the subsequent GET, so what I send down doesn't really matter. The HTTP on the wire is the same: GET /people/%5Cslash I won't go into the reason I want to have that character in the URL. As Mark says it's valid and that's sufficient for what I'm attempting to accomplish.