On Tue, 14 Aug 2001, Justin Erenkrantz wrote:
> On Wed, Aug 15, 2001 at 03:41:30AM +0100, Pier P. Fumagalli wrote:
> > Justin Erenkrantz at [EMAIL PROTECTED] wrote:
> > >
> > > I wonder how Pier is addressing this in mod_webapp. I'll have to
> > > look. -- justin
> >
> > Easy as 1.2.3... WARP has a concept of URI and QUERY STRING... Very separate
> > things... All I do is
> >
> > req->ruri=apr_pstrdup(req->pool,r->uri);
> > req->args=apr_pstrdup(req->pool,r->args);
> >
> > The URI goes into the URI, the query string goes into the query string...
> > Apache does it for me, why should I bother? :)
>
> Which, of course, is the right solution.
>
> But, do you have to (re)escape the uri (or, is that done in Java
> land?)? Seems like the 2.2 spec says that the getRequestURI()
> function must return an escaped URI. r->uri is unescaped. Or, does
> 2.3 say something different? -- justin
>
>
The getRequestURI() method is supposed to return the *undecoded* request
URI. As Costin points out, re-escaping an escaped version is not the same
thing. This didn't change in 2.3 -- however, in 2.2. it wasn't formally
documented until an errata was published:
http://java.sun.com/products/servlet/errata_042700.html
Same thing for getQueryString() -- must remain undecoded.
Craig