httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Verbeeck <Kris.Verbe...@ubizen.com>
Subject mod_deflate in 2.0.40
Date Fri, 30 Aug 2002 09:51:53 GMT
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, "gzip-only-text/html");
      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

Mime
View raw message