tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r572498 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java
Date Tue, 04 Sep 2007 02:45:37 GMT
Author: billbarker
Date: Mon Sep  3 19:45:37 2007
New Revision: 572498

URL: http://svn.apache.org/viewvc?rev=572498&view=rev
Log:
Forward porting Reader fixes from 5.5.x

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=572498&r1=572497&r2=572498&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java Mon Sep  3 19:45:37
2007
@@ -292,7 +292,8 @@
         if (coyoteRequest == null)
             return -1;
 
-        state = BYTE_STATE;
+        if(state == INITIAL_STATE)
+            state = BYTE_STATE;
 
         int result = coyoteRequest.doRead(bb);
 
@@ -325,6 +326,8 @@
     public void realWriteChars(char c[], int off, int len) 
         throws IOException {
         markPos = -1;
+        cb.setOffset(0);
+        cb.setEnd(0);
     }
 
 
@@ -351,12 +354,9 @@
             cb.setEnd(0);
         }
 
-        int limit = bb.getLength()+cb.getStart();
-        if( cb.getLimit() < limit ) 
-	    cb.setLimit(limit);
-        conv.convert(bb, cb);
-        bb.setOffset(bb.getEnd());
         state = CHAR_STATE;
+        conv.convert(bb, cb, len);
+        bb.setOffset(bb.getEnd());
 
         return cb.getLength();
 



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


Mime
View raw message