cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <>
Subject Re: Spaces in request parameters: Problems with raw-request-param
Date Mon, 01 Dec 2003 23:00:06 GMT
Joerg Heinicke wrote:
> Hello Tony,
> please read the mail at 
> It 
> seems to be exactly the same problem. Can you confirm this?

I'm not too sure. It's a similar problem (things being decoded when they shouldn't), but I
get the 
following output when I replace URLDecoder.decode(uri) with just "uri":

With the request in my browser:


uri:          raw-test/request+plus+whitespace
decoded:      raw-test/request plus whitespace
querystring:  parameter+plus+whitespace=val+plus+whitespace
requestUri:   /raw-test/request+plus+whitespace

The last two lines are from request.getQueryString() and request.getRequestURI(), respectively.

IMHO request.getRequestURI() should return the URI as it was sent (i.e. encoded always). 
the URLDecoder.decode() seems to fix this, but I'm not sure what else this breaks ;)

Getting back to the raw-request module:

- With the URLDecoder.decode() removed, the module still returns things decoded, so I think
problems are not related. Looking through some of my servlet books and Java API docs, there
is no 
way to get an "encoded" request parameter value from HttpServletRequest.

> Joerg



View raw message