You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Kris Verbeeck <Kr...@ubizen.com> on 2002/08/30 13:19:58 UTC
[PATCH] Re: mod_deflate in 2.0.40
Hi again,
After testing I discovered that some more changes were needed to get it to work.
Patch has been attached. This patch should still have the behaviour of enabling
compression when "gzip-only-text/html" is set to something other than "1". It
will also enable compression if "gzip-only-text/html" is not set at all.
Kris Verbeeck wrote:
>
> Hi,
>
> The 2.0.39 code:
>
> if ((r->content_type == NULL || strncmp(r->content_type, "text/html", 9))
> && apr_table_get(r->subprocess_env, "gzip-only-text/html")) {
> ap_remove_output_filter(f);
> return ap_pass_brigade(f->next, bb);
> }
>
> says 'if we have a response with a content-type other than "text/html" AND
> the environment variable "gzip-only-text/html" is defined then we will
> not deflate (remove filter)'
>
> The 2.0.40 code:
>
> if (r->content_type == NULL || strncmp(r->content_type, "text/html", 9)) {
> const char *env_value = apr_table_get(r->subprocess_env, ");
> if ( env_value == NULL || strcmp(env_value,"1") ) {
> ap_remove_output_filter(f);
> }
> return ap_pass_brigade(f->next, bb);
> }
>
> says 'if we have a response with a content-type other than "text/html" AND
> "gzip-only-text/html" is not defined OR it is defined but different from "1"
> then we will not deflate (remove filter)'
>
> IMHO this is something completely different. With the new code the filter is always
> removed unless you define "gzip-only-text/html" to be "1". So you can't compress
> other files, e.g. ".txt". I think the strcmp test should be "strcmp(...) == 0".
>
> Or am I missing something??
>
> --
> ir. Kris Verbeeck
> Development Engineer
>
> Ubizen - Ubicenter - Philipssite 5 - 3001 Leuven - Belgium
> T: +32 16 28 70 64
> F: +32 16 28 70 77
>
> Ubizen - We Secure e-business - www.ubizen.com
--
ir. Kris Verbeeck
Development Engineer
Ubizen - Ubicenter - Philipssite 5 - 3001 Leuven - Belgium
T: +32 16 28 70 64
F: +32 16 28 70 77
Ubizen - We Secure e-business - www.ubizen.com