remm        2005/01/06 04:43:15

  Modified:    http11/src/java/org/apache/coyote/http11
                        Http11Processor.java
  Log:
  - Content length should be ignored if there is chunking.
  
  Revision  Changes    Path
  1.117     +8 -8      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
  
  Index: Http11Processor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
  retrieving revision 1.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- Http11Processor.java      10 Dec 2004 00:00:00 -0000      1.116
  +++ Http11Processor.java      6 Jan 2005 12:43:15 -0000       1.117
  @@ -1222,14 +1222,6 @@
           // Input filter setup
           InputFilter[] inputFilters = inputBuffer.getFilters();
   
  -        // Parse content-length header
  -        long contentLength = request.getContentLengthLong();
  -        if (contentLength >= 0) {
  -            inputBuffer.addActiveFilter
  -                (inputFilters[Constants.IDENTITY_FILTER]);
  -            contentDelimitation = true;
  -        }
  -
           // Parse transfer-encoding header
           MessageBytes transferEncodingValueMB = null;
           if (http11)
  @@ -1260,6 +1252,14 @@
                   // 501 - Unimplemented
                   response.setStatus(501);
               }
  +        }
  +
  +        // Parse content-length header
  +        long contentLength = request.getContentLengthLong();
  +        if (contentLength >= 0 && !contentDelimitation) {
  +            inputBuffer.addActiveFilter
  +                (inputFilters[Constants.IDENTITY_FILTER]);
  +            contentDelimitation = true;
           }
   
           MessageBytes valueMB = headers.getValue("host");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to