Hello Tony,
please read the mail at http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106796038708692&w=2. 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:
http://localhost:8888/raw-test/request+plus+whitespace?parameter+plus+whitespace=val+plus+whitespace
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). Removing 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 the 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
WDYT?
Tony
