http://issues.apache.org/bugzilla/show_bug.cgi?id=17629
basic flow inside httpd: - handler sends output - mod_include processes. data starts going down the filter chain. - mod_include sees the need for a CGI (include/virtual/whatever). - mod_include creates a subrequest. This subrequest uses the same filter chain. - If the subrequest is on a CGI, and that CGI sends a redirect (Location:), mod_cgi{d} creates an internal redirect, which does *not* use the same filter chain. Any output from this redirect does not get put into the same chain as the Main Request. - Meanwhile, mod_deflate, which is on the main request's filter chain, will gzip encode the content that goes through it.
The end result is mixed gzip and non-gzipped content.
I tried searching the mailing list quickly, but I didn't see any reasoning why mod_cgi{d} uses an internal redirect for these cases.
The easy solution is to make mod_cgi{d} create a full subrequest, that would therefore use the same filter chain, and therefore mod_deflate would properly encode the content.
It seems that calling an internal redirect from anywhere in an output filter is completely wrong.
Is there any reason not to switch mod_cgi{d} to use subrequests? If no one objects, I will do it in a couple days.
Thanks,
-Paul Querna