httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51350] New: mod_deflate compresses zero length content into an invalid 20 byte body
Date Thu, 09 Jun 2011 20:42:22 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51350

             Bug #: 51350
           Summary: mod_deflate compresses zero length content into an
                    invalid 20 byte body
           Product: Apache httpd-2
           Version: 2.2.16
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_deflate
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: apache@tibit.com
    Classification: Unclassified


When my web application returns a response with an empty body and Content-Type:
text/plain or text/html, mod_deflate replaces the body with 20 bytes that can't
be decompressed.  I'm guessing this is a gzip header created when trying to
deflate 0 bytes of data.

Wireshark reports "Error: Decompression Failed" on those 20 bytes, and I
believe some browsers choke on them as well.

Unfortunately, since various web frameworks default to a text Content-Type for
empty responses, this means the bad body is pretty common on things like
OPTIONS responses.

I have verified that the Content-Type header field triggers the problem by
writing special-case code to intercept it on 0-byte responses.  Removing that
header field or using an alternative type (e.g. 'application/json') makes the
invalid 20-byte body disappear.

I'm using a stock Ubuntu build of Apache.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message