Author: markt
Date: Sun Mar 17 09:33:41 2013
New Revision: 1457403

URL: http://svn.apache.org/r1457403
Log:
There was a reason mark/reset was used here. Restore use of mark/reset and add 
a comment.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1457402

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java?rev=1457403&r1=1457402&r2=1457403&view=diff
==============================================================================
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/parser/HttpParser.java 
Sun Mar 17 09:33:41 2013
@@ -366,9 +366,12 @@ public class HttpParser {
     private static String readTokenOrQuotedString(StringReader input,
             boolean returnQuoted) throws IOException {
 
+        // Use mark/reset as skip(-1) fails when reading the last character of
+        // the input
+        input.mark(1);
         int c = input.read();
-        // Skip back so first character is available to be read again
-        input.skip(-1);
+        // Go back so first character is available to be read again
+        input.reset();
 
         if (c == '"') {
             return readQuotedString(input, returnQuoted);



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

Reply via email to