[Catalyst] How to send raw HTTP response

Tomas Doran bobtfish at bobtfish.net
Thu Sep 25 22:04:58 BST 2008


On 25 Sep 2008, at 19:35, Christian Lackas wrote:
>
>     print CGI::header(...);
>     $ZIP->writeToFileHandle(*STDOUT);
>     for my $f (@files) {
>         $ZIP->addFile($f, basename($f));
>     }
>
> How can I achieve something similar under Catalyst?

Looking at the source code for Catalyst::write, and  
Catalyst::Engine::write, you need to say $c->finalize_headers, after  
which just writing to STDOUT as above should do the right thing..

However, I'd have thought that clients on the other end would be  
somewhat unhappy with not getting a Content-Length header...

Cheers
t0m




More information about the Catalyst mailing list