tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters ChunkedInputFilter.java
Date Thu, 20 Jun 2002 11:14:30 GMT
remm        2002/06/20 04:14:30

  Modified:    http11/src/java/org/apache/coyote/http11/filters
                        ChunkedInputFilter.java
  Log:
  - Tighten up chunk lenght handling.
  
  Revision  Changes    Path
  1.5       +4 -2      jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
  
  Index: ChunkedInputFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ChunkedInputFilter.java	23 May 2002 20:30:49 -0000	1.4
  +++ ChunkedInputFilter.java	20 Jun 2002 11:14:30 -0000	1.5
  @@ -317,6 +317,8 @@
               endChunk = true;
   
           remaining = result;
  +        if (remaining < 0)
  +            return false;
   
           return true;
   
  @@ -335,14 +337,14 @@
   
               if (pos >= lastValid) {
                   if (readBytes() <= 0)
  -                    return false;
  +                    throw new IOException("Invalid CRLF");
               }
   
               if (buf[pos] == Constants.CR) {
               } else if (buf[pos] == Constants.LF) {
                   eol = true;
               } else {
  -                return false;
  +                throw new IOException("Invalid CRLF");
               }
   
               pos++;
  
  
  

--
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