Re: Going crazy over mod_deflate
| From: | Jochem Maas | Date: | Fri, 08 Dec 2006 09:37:58 +0000 |
| Subject: | Re: Going crazy over mod_deflate | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245646@lists.php.net to get a copy of this message | ||
Cabbar Duzayak wrote:
> Before I start, I am using apache 2.0.52 with PHP 4.3.9.
>
> In my .htaccess, I have a rewrite rule that rewrites /bb.flv as
> /bb.php, and this bb.php file reads a flv file and outputs it. In the
> PHP file, I am specifying content-type as video/x-flv and
> content-length, however mod_deflate still compresses this, and also
> removes the content-length header from the response, and this messes
> up the flv player!...
>
> I tried everything, simply everything, and yet could not get
> mod_deflate to by-pass this file. For some reason, it does not see
> this content as video/x-flv, and treats is as regular text???? And,
> when I disable the mod_deflate filter, everything returns back to
> normal. BTW, I am not doing any compression on the PHP side!...
>
> Things I tried are:
>
> + AddOutputFilterByType DEFLATE text/html text/plain text/xml
>
> + SetEnvIfNoCase Request_URI \
> \.(?:gif|jpe?g|png|flv)$ no-gzip dont-vary
have you tried something like this:?
\(?:\/bb\.php|.(?:gif|jpe?g|png|flv))$ no-gzip dont-vary
>
> I tried putting these in <directory>, <location>, <virtual> and global
> context, and none of them worked. Additionally, I tried to rewrite the
> type using the rewriterule as:
> RewriteRule ^bb.flv /bb.php [T=video/x-flv]
>
> I also tried ForcedType, AddTpe, AddOutputFilter (by extension), etc. etc.
>
> But, still the output is compressed. And, the response headers I am
> seeing are:
>
> content-disposition: inline; filename=123.flv
> Vary: Accept-Encoding
> Content-Encoding: gzip
> Keep-Alive: timeout=5, max=96
> Connection: Keep-Alive
> Transfer-Encoding: chunked
> Content-Type: video/x-flv
>
> Can you please tell what I am missing here and/or is there anyway I
> can by-pass the mod_deflate compression?
>
> TIA.
>