[Catalyst] How to send raw HTTP response

Tatsuhiko Miyagawa miyagawa at gmail.com
Fri Sep 26 07:41:10 BST 2008


On Fri, Sep 26, 2008 at 3:14 PM, Sebastian Riedel
<sri-lists at labs.kraih.com> wrote:

>> The only two consequences I know of for not including the content length
>> is
>> that the download bar for the transfer lists unknown in browsers, and if
>> the transfer fails midway the browser does not "know".
>
> Things will go wrong, they always do.
> Not following the RFC is a very bad idea, without a content-length header
> the client could react completely random.
>
> The right way to do it would be a response with chunked transfer encoding.

If you run your app in CGI or mod_perl under Apache, the response will
be automatically turned into chunked transfer encoding by Apache if
your response header doesn't have Content-Length and the request is
made in HTTP/1.1.



-- 
Tatsuhiko Miyagawa



More information about the Catalyst mailing list