This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 7255cd488d9fadce8b473daa803dee7eb31a64da
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Mar 16 16:18:53 2020 +0000

    Call byte decode method directly.
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index fc0fdd0..783fc24 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -721,13 +721,14 @@ public class CoyoteAdapter implements Adapter {
 
         // Parse the path parameters. This will:
         //   - strip out the path parameters
-        //   - convert the decodedURI to bytes
+        //   - convert the decodedURI to bytes (if it isn't already)
         parsePathParameters(req, request);
 
         // URI decoding
         // %xx decoding of the URL
         try {
-            req.getURLDecoder().convert(decodedURI, false);
+            // Will always by in bytes at this point
+            req.getURLDecoder().convert(decodedURI.getByteChunk(), false);
         } catch (IOException ioe) {
             res.setStatus(400);
             res.setMessage("Invalid URI: " + ioe.getMessage());


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

Reply via email to