Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
the DefaultParameterParser does not decode UTF-8 caracters correctly
For instance when path info is the following: /screen/Download/webfile/Report%C3%A9%C3%A7%C3%A8%C3%A9%27.txt
I got => org.apache.turbine.util.parser.DefaultParameterParser - Key: webfile -> Reportéçèé'.txt
instead of => /screen/Download/webfile/Reportéçèé'.txt
given by the followed piece of code: URLDecoder.decode( data.getRequest().getRequestURI(),"UTF-8")
I think that we just need to replace in DefaultParameterParser in method setRequest(HttpServletRequest request)
+paramName = URLDecoder.decode(st.nextToken(),"UTF-8"); // UTF-8 is recommended by W3C what ever the application encoding. it should not depend on input.encoding parameter
-paramName = URLDecoder.decode(st.nextToken()); // this is depreciated