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 2014/05/27 23:53:09 UTC
[Bug 56569] New: Null CRC in gzip footer with mod_cgid and
ErrorDocument
https://issues.apache.org/bugzilla/show_bug.cgi?id=56569
Bug ID: 56569
Summary: Null CRC in gzip footer with mod_cgid and
ErrorDocument
Product: Apache httpd-2
Version: 2.4.9
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_deflate
Assignee: bugs@httpd.apache.org
Reporter: brad.newman@gmail.com
When using a CGI as an ErrorDocument, together with mod_deflate to compress the
response body, the CRC32 in the gzip footer may be null when the request also
contained a request body.
I'll attach a simple httpd.conf and Bash CGI script that I've reproduced the
issue with. The issue is not unique to curl or Bash; it was originally
encountered with a Perl CGI and Java client code.
A hex dump of the response bodies shows that the second to last 32-bit word -
the CRC32 in the gzip footer - is null. The responses are otherwise identical.
# Not working as expected - CRC is null
$ curl -s -HAccept-Encoding:gzip -XPOST -dbody http://localhost/cgi-bin/404 |
xxd
0000000: 1f8b 0800 0000 0000 0003 3dcb 310e 8020 ..........=.1..
0000010: 1044 d1de 538c 950d f134 5e40 7102 24c2 .D..S....4^@q.$.
0000020: 1a76 8972 7b8d 85c9 2fdf 5f62 52bc a964 .v.r{.../._bR..d
0000030: a224 4f18 6f83 09bc e4b3 52d5 a1af 7d04 .$O.o.....R...}.
0000040: 96c8 4ae4 a686 8d60 9116 e287 1d78 2891 ..J....`.....x(.
0000050: 0c97 94c9 1068 ffcc 7d1e 1e00 0000 0063 .....h..}......c
0000060: 0000 00 ...
# Working as expected
$ curl -s -HAccept-Encoding:gzip -XPOST -dbody
http://localhost/cgi-bin/test.cgi | xxd
0000000: 1f8b 0800 0000 0000 0003 3dcb 310e 8020 ..........=.1..
0000010: 1044 d1de 538c 950d f134 5e40 7102 24c2 .D..S....4^@q.$.
0000020: 1a76 8972 7b8d 85c9 2fdf 5f62 52bc a964 .v.r{.../._bR..d
0000030: a224 4f18 6f83 09bc e4b3 52d5 a1af 7d04 .$O.o.....R...}.
0000040: 96c8 4ae4 a686 8d60 9116 e287 1d78 2891 ..J....`.....x(.
0000050: 0c97 94c9 1068 ffcc 7d1e 1ee6 6eff 6b63 .....h..}...n.kc
0000060: 0000 00 ...
Oddly, in addition to the other conditions, the CRC is only null if the 404
occurs within the the cgi-bin directory (make-requests.sh will also be
attached):
$ bash ~/make-requests.sh
direct to CGI, with request body:
via 404 in cgi-bin, with request body:
gzip: stdin: invalid compressed data--crc error
via 404 outside cgi-bin, with request body:
via 404 in cgi-bin, without request body:
--
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 56569] Null CRC in gzip footer with mod_cgid and ErrorDocument
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56569
Yann Ylavic <yl...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |FixedInTrunk
--- Comment #4 from Yann Ylavic <yl...@gmail.com> ---
Thanks Brad for reporting.
This is already fixed in trunk as part of bug 46146, and proposed for backport
in 2.4.x.
Patch http://svn.apache.org/r1572671 works for 2.4.x if you can't wait.
--
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 56569] Null CRC in gzip footer with mod_cgid and ErrorDocument
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56569
--- Comment #2 from Brad Newman <br...@gmail.com> ---
Created attachment 31669
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31669&action=edit
Simple httpd configuration to reproduce
--
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 56569] Null CRC in gzip footer with mod_cgid and ErrorDocument
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56569
--- Comment #3 from Brad Newman <br...@gmail.com> ---
Created attachment 31670
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31670&action=edit
Simple client script to reproduce
--
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 56569] Null CRC in gzip footer with mod_cgid and ErrorDocument
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56569
--- Comment #1 from Brad Newman <br...@gmail.com> ---
Created attachment 31668
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31668&action=edit
Simple CGI script to reproduce
--
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