Author: remy.maucherat(a)jboss.com
Date: 2008-07-21 07:47:33 -0400 (Mon, 21 Jul 2008)
New Revision: 722
Modified:
trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Log:
- Better comments.
Modified: trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2008-07-18 06:46:11 UTC
(rev 721)
+++ trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2008-07-21 11:47:33 UTC
(rev 722)
@@ -830,11 +830,11 @@
/**
* Check that the URI is normalized following character decoding.
* <p>
- * This method checks for "\", "//", "/./" and
"/../". This method will
- * return false if sequences that are supposed to be normalized still
+ * This method checks for "\", 0, "//", "/./" and
"/../". This method will
+ * return false if sequences that are supposed to be normalized are still
* present in the URI.
*
- * @param uriMB URI to be normalized
+ * @param uriMB URI to be checked (should be chars)
*/
public static boolean checkNormalize(MessageBytes uriMB) {
@@ -845,7 +845,7 @@
int pos = 0;
- // Check for '\' and for null byte
+ // Check for '\' and 0
for (pos = start; pos < end; pos++) {
if (c[pos] == '\\') {
return false;
@@ -864,7 +864,7 @@
}
}
- // Check for URI ending with "/." or "/.."
+ // Check for ending with "/." or "/.."
if (((end - start) >= 2) && (c[end - 1] == '.')) {
if ((c[end - 2] == '/')
|| ((c[end - 2] == '.')
@@ -878,7 +878,7 @@
return false;
}
- // Check for "/./"
+ // Check for "/../"
if (uriCC.indexOf("/../", 0, 4, 0) >= 0) {
return false;
}