tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34526] New: - Truncated content in decompressed requests from mod_deflate
Date Tue, 19 Apr 2005 17:31:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34526>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34526

           Summary: Truncated content in decompressed requests from
                    mod_deflate
           Product: Tomcat 5
           Version: 5.0.30
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Native:JK
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: mike_bos@mail.com


Brief summary: if a request is compressed (Content-Encoding: gzip), has
Content-Length corresponding to the compressed length, and if Apache's
mod_deflate is configured to decompress such requests, then the servlet request
input stream signals EOF at Content-Length bytes of decompressed content instead
of returning the entire decompressed content.

To reproduce:
- Enable Apache mod_deflate request decompression:
  <Location /servlet/MyTest>
    SetInputFilter DEFLATE
  </Location>
- Send a compressed request, e.g. compress a file with gzip and send it with cURL:
  gzip -9c some_file | curl -H 'Content-Encoding: gzip' --data-binary @-
http://host/servlet/MyTest

The servlet will get truncated data.

It's ok if the servlet will see Content-Length different from the actual number
of bytes in the request stream, servlets shouldn't trust Content-Length anyway,
and under chunked encoding Content-Length is not there at all, so IMHO useless
Content-Length value is a nonissue.

The only workaround so far is to write a servlet filter to decompress requests,
but that puts additional load on Tomcat and complicates web app configuration.

Possibly related HTTP server bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=23287
See my comment there (Michael Klepikov) for additional details.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message