tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters IdentityInputFilter.java
Date Thu, 08 Aug 2002 05:37:10 GMT
billbarker    2002/08/07 22:37:10

  Modified:    http11/src/java/org/apache/coyote/http11/filters
                        IdentityInputFilter.java
  Log:
  Avoid looping on when trying to trash un-read input.
  
  Fix for Bug #11417
  Reported By: Amund Elstad amund.elstad@ergo.no
  
  Revision  Changes    Path
  1.10      +6 -1      jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/IdentityInputFilter.java
  
  Index: IdentityInputFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/IdentityInputFilter.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- IdentityInputFilter.java	9 Apr 2002 18:35:54 -0000	1.9
  +++ IdentityInputFilter.java	8 Aug 2002 05:37:10 -0000	1.10
  @@ -200,7 +200,12 @@
   
           // Consume extra bytes.
           while (remaining > 0) {
  -            remaining = remaining - buffer.doRead(endChunk, null);
  +            int nread = buffer.doRead(endChunk, null);
  +            if (nread > 0 ) {
  +                remaining = remaining - nread;
  +            } else { // errors are handled higher up.
  +                remaining = 0;
  +            }
           }
   
           // If too many bytes were read, return the amount.
  
  
  

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


Mime
View raw message