On Sun, Mar 22, 2009 at 12:25:53PM +0100, Louis-David Mitterrand wrote:
> Hi,
> 
> To serve binary content from a component I am doing:
> 
> <%init>
> $m->clear_buffer();
> $r->content_type("video/mp4");
> $r->headers_out->add('Content-length' => -s $file);
> $r->sendfile($file);
> $m->abort(200);
> </%init>
> 
> Is that the correct way?
> 
> Also, _must_ I add "inherit=>undef" in the <%flags> section? Or is the
> $m->clear_buffer() enough to insure no autohandler side effect may
> corrupt the $file output?

Following-up to myself, I noticed something interesting (maybe a bug in
mod_deflate). 

I have mod_deflate enabled with the default:

AddOutputFilterByType DEFLATE text/html text/plain text/xml

But when I try to serve some binary (video/mp4) content from one of my
.md mason files (which has "AddType text/html .md") apache sends it
gzip'ed despite the fact the content-type has been changed to video/mp4.
The problem is FlowPlayer (flash video player) doesn't appreciate gzip
compression it seems.

I certainly could disable mod_deflate and be on my merry way. 

But I thought I'd ask the list whether this mod_deflate behaviour is
expected and/or normal?

Thanks,

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to