From: kkolinko Date: Mon, 21 Dec 2009 13:20:01 +0000 (+0000) Subject: Remove unneeded line from the method that normalizes decodedURI. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=292ab6a6719c3a4bd1d87ee0153177bda51ae9b8;p=tomcat7.0 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 --- 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; }