httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kees Nuyt <>
Subject Re: [users@httpd] rewrite and InputFilter DEFLATE
Date Sun, 09 Nov 2014 22:01:11 GMT
On Sun, 9 Nov 2014 11:04:33 -0300, you wrote:

>I`m digging with this problem for a while and couldn`t find references
>in lists or searches.
>In Apache 2.4.7 I`m using "InputFilter DEFLATE" to inflate gzipped
>requests (as documented in
> and it
>works great. But a simple rewrite:
>RewriteRule ^.*$ index.php [NC,L]
>makes the inflate stop to work, index.php receives the body still
>gzipped. If I comment the line above and point my request directly to
>index.php the inflation works again.
>I`ve debugged modules/filters/mod_deflate.c and it is aborting
>inflation on line 1036, when checking body size:
>/* zero length body? step aside */
>bkt = APR_BRIGADE_FIRST(ctx->bb);
>if (APR_BUCKET_IS_EOS(bkt)) {
>    ap_remove_input_filter(f);
>    return ap_get_brigade(f->next, bb, mode, block, read bytes);
>I`m really not aware of any causes for mod_rewrite to be incompatible
>to mod_deflate. Inflating before or after the rewrite engine I think
>it should work.
>Do you have any pointer to understand this issue?

Perhaps AliasMatch doesn't suffer that problem?
I use:

<VirtualHost *:80>
   ServerName    somesite
   ServerAdmin   somesitemaster@somsite.invalid
   DocumentRoot "/var/www/html/somesite"
   AliasMatch ^/(.*) "/var/www/html/somesite/index.php/$1"
   <Directory   "/var/www/html/somesite">
      AllowOverride None
      Order deny,allow
      Deny from all
      Allow from all
      <FilesMatch "^.*$>
         ForceType application/x-httpd-php

, but I never bothered to gzip requests. It forces all requests
to index.php, just like you appear to need.

About the $1 in the above: index.php uses $_SERVER['PATH_INFO']
and $_SERVER['QUERY_STRING'] to reconstruct the original

Hope this helps.


Kees Nuyt

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message