You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2012/01/20 23:54:21 UTC
DO NOT REPLY [Bug 52492] New: requests with gzip+chunked encoded
body return 400 in some cases
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
[Bug 52492] requests with gzip+chunked encoded body return 400 in
some cases
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52492
--- Comment #1 from Lars Tuschinski <la...@ista.com> ---
We are actually seeing this issue without having chunked transfer-encoding.
There is just a TCP-packet of 8 bytes size that is not seen by mod_deflate.
Those 8 bytes contain the crc and original (unzipped) lenght.
I had a look at the area where I believe the problem shows up. But couldn't
find a solution how to read the missing 8 bytes from the wire (as suggested in
the FIXME-comment on line 944 in mod_deflate.c of httpd 2.2.23.
But if I can be of any assistance, please let me know.
--
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
[Bug 52492] requests with gzip+chunked encoded body return 400 in
some cases
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52492
Lars Tuschinski <la...@ista.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lars.tuschinski@ista.com
--
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
[Bug 52492] requests with gzip+chunked encoded body return 400 in
some cases
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52492
Christian Nols <ch...@mcl-technologies.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Christian Nols <ch...@mcl-technologies.com> ---
*** This bug has been marked as a duplicate of bug 46146 ***
--
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