Re: chunked transfer encoding and HTTP::Daemon

Gisle Aas <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
[email protected] (Andreas J. Koenig) writes:

> Does anybody have (or can point me to) a working example of
> HTTP::Daemon that implements a server that is capable to handle
> "Transfer-Encoding: chunked"? (I mean really capable, which means it
> should work without a Content-Length header and for inputs that tickle
> in in small chunks.)

The $c->get_request method should handle "Transfer-Encoding: chunked"
just fine, but it will not return until all the content data has been
received.  If you want to process chunked data as it is received, then
you will have to tell it to only read past the headers with
$c->get_request(1) and then do the parsing of the chunked body
yourself.

--Gisle
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.