Re: rewrite and InputFilter DEFLATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 9 Nov 2014 11:04:33 -0300, you wrote:

>Hello!
>
>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
>http://httpd.apache.org/docs/2.4/mod/mod_deflate.html#enable) 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
      </FilesMatch>
   </Directory>
</VirtualHost>

, 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
request.

Hope this helps.

-- 
Regards,

Kees Nuyt

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux