Author: markt
Date: Mon Dec  1 21:58:05 2014
New Revision: 1642766

URL: http://svn.apache.org/r1642766
Log:
Use correct character set when decoding
kkolinko's review of fix for BZ 57215

Modified:
    tomcat/trunk/java/org/apache/catalina/connector/Request.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1642766&r1=1642765&r2=1642766&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Mon Dec  1 
21:58:05 2014
@@ -1892,10 +1892,10 @@ public class Request
         }
         // Now allow for normalization and/or encoding. Essentially, keep
         // extending the candidate path up to the next slash until the decoded
-        //and normalized candidate path is the same as the canonical path.
+        // and normalized candidate path is the same as the canonical path.
         String candidate = uri.substring(0, pos);
         if (pos > 0) {
-            candidate = UDecoder.URLDecode(candidate);
+            candidate = UDecoder.URLDecode(candidate, 
connector.getURIEncoding());
             candidate = 
org.apache.tomcat.util.http.RequestUtil.normalize(candidate);
         }
         while (!canonicalContextPath.equals(candidate)) {
@@ -1904,7 +1904,7 @@ public class Request
                 return uri;
             }
             candidate = uri.substring(0, pos);
-            candidate = UDecoder.URLDecode(candidate);
+            candidate = UDecoder.URLDecode(candidate, 
connector.getURIEncoding());
             candidate = 
org.apache.tomcat.util.http.RequestUtil.normalize(candidate);
         }
         return uri.substring(0, pos);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to