Author: kkolinko
Date: Mon Dec 21 13:20:01 2009
New Revision: 892812
URL: http://svn.apache.org/viewvc?rev=892812&view=rev
Log:
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.
Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=892812&r1=892811&r2=892812&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Mon Dec
21 13:20:01 2009
@@ -832,8 +832,8 @@
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 @@
index = index2;
}
- uriBC.setBytes(b, start, end);
-
return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]