From 292ab6a6719c3a4bd1d87ee0153177bda51ae9b8 Mon Sep 17 00:00:00 2001 From: kkolinko Date: Mon, 21 Dec 2009 13:20:01 +0000 Subject: [PATCH] Remove unneeded line from the method that normalizes decodedURI. The line "uriBC.setBytes(b, start, end);" is wrong, as it should have been "uriBC.setBytes(b, start, end - start);". I suppose that it worked because in the only place that calls this normalize() method the value of 'start' was always equal to zero. Instead of fixing, I am removing that line, because it actually is not needed there at all, thanks to the uriBC.setEnd() calls above it. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@892812 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/connector/CoyoteAdapter.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java index 5140776d7..c1ed81e41 100644 --- a/java/org/apache/catalina/connector/CoyoteAdapter.java +++ b/java/org/apache/catalina/connector/CoyoteAdapter.java @@ -832,8 +832,8 @@ public class CoyoteAdapter public static boolean normalize(MessageBytes uriMB) { ByteChunk uriBC = uriMB.getByteChunk(); - byte[] b = uriBC.getBytes(); - int start = uriBC.getStart(); + final byte[] b = uriBC.getBytes(); + final int start = uriBC.getStart(); int end = uriBC.getEnd(); // An empty URL is not acceptable @@ -927,8 +927,6 @@ public class CoyoteAdapter index = index2; } - uriBC.setBytes(b, start, end); - return true; } -- 2.11.0