Antwort: [Mod_gzip] Compressing 404 output
mod_gzip@lists.over.net
mod_gzip@lists.over.net
Fri, 4 Apr 2003 16:10:21 +0200
Hi Paul,
> Bit of a curious issue here, I'm trying to get the output of
> 404 pages to be compressed.
>
> Currently I get the following in the log:
> GET /bhelton HTTP/1.1" 404 9206 mod_gzip: SEND_AS_IS:NO_200 In:0 -< Out:0
= 0 pct.
this isn't configurable in mod_gzip, as of now.
The setting of "SEND_AS_IS:NO_200" is hard-coded in
mod_gzip.c, line 5756 to 5769:
if ( resp_code != 200 )
{
#ifdef MOD_GZIP_DEBUG1
mod_gzip_printf( "%s: resp_code is NOT '200'...",cn);
mod_gzip_printf( "%s: Issuing send_as_is++",cn);
#endif
send_as_is++;
#ifdef MOD_GZIP_USES_APACHE_LOGS
mod_gzip_strcat( lbuf, ":NO_200");
#endif
}
You might try to simply remove this section and recompile
mod_gzip if you actually need this feature - but read on.
I once asked Kevin Kiley about this, and I believe to remember
he responded that according to his tests some browsers would
misbehave (maybe even crash) when receiving a non-200 response
containing a Content-Encoding. But I don't remember any details
about which browsers and versions he had tested.
So this topic would require new tests which version of which
browser handles these responses correctly - and if it appears
to no longer be a problem, then this restriction might just be
removed from some future mod_gzip release (or maybe some con-
figuration directive might be created to turn it on/off).
Regards, Michael