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 52492] New: requests with gzip+chunked encoded body return 400 in some cases
Date Fri, 20 Jan 2012 22:54:21 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52492

             Bug #: 52492
           Summary: requests with gzip+chunked encoded body return 400 in
                    some cases
           Product: Apache httpd-2
           Version: 2.2.21
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_deflate
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: lmeyer@vmware.com
    Classification: Unclassified


Created attachment 28182
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28182
chunk-zip-test.pl script and chunk-test-file.txt for exercising the server;
400.trace shows results; other logs etc.

When a client submits a request body with gzip compression and chunked
transfer-encoding, and mod_deflate is directed to unzip input, if the last
chunk is "too small" (8 bytes or smaller, as far as I can tell) the server will
reject the request with a 400 error. I've observed this when it wasn't the last
chunk that's small, but that doesn't seem as repeatable.

Attached are the instruments to reliably produce this problem. It's a little
tricky to get a client that will chunk exactly as desired, so I created one
manually in Perl - open to the possibility that my script is wrong, but
Wireshark seems to understand the requests made, and httpd too depending on the
conditions, so I think it's right.

Contents:
chunk-zip-test.pl - Perl test script; requires IO::Socket::INET and
Compress::Zlib
chunk-test-file.txt - test content to send (portion of system dictionary)
httpd.conf.snippet - conf to activate mod_deflate (assuming it's
loaded/compiled in)
400.trace - example packet trace demonstrating the problem
httpd-V.txt and system - info about my setup
logs.snippet - debug output from bad request
*_log - full logs for context

If httpd is running at localhost:80 with the mod_deflate snippet in place,
testing should be very simple:
$ ./chunk-zip-test.pl -size=40
The script defaults gzip and send the file to localhost:80; specifying 40-byte
chunks results in the packet trace above with a 400 response.

This particular bug might seem an unlikely use case, but in testing with this
script I've noticed a number of possible problem areas that I'll reserve for
other bugs, probably related to the central pattern of mod_deflate handling
chunked requests. Since this one is relatively simple, it may be the best one
to look at first.

I've only tested on Linux (CentOS 5) but have observed the problem with both
httpd 2.2.21 and 2.3.16 as well as earlier versions. Let me know if there's
anything I can do to assist with this bug.

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