[FFmpeg-devel] [PATCH] http Transfer-Encoding chunked

Ronald S. Bultje rsbultje
Sat May 23 05:11:54 CEST 2009


Hi Peter,

On Fri, May 22, 2009 at 1:13 PM, Peter Holik <peter at holik.at> wrote:
> That was not working because http.c sends a HTTP/1.1 request and in the response
> i got a "Transfer-Encoding: chunked" Header - not known by http.c.
>
> The only drawback of my patch is, that the filesize is limited (i've taken 512 kByte)

Just set filesize to -1 then, i.e. unlimited. Don't make up some
arbitrary number. It should just work.

For the last chunk, your patch reads:
0\r\n
which signals the last-chunk (empty). However, this should (if I
understand correctly) be followed by *another* \r\n before the next
HTTP header starts (in a stream if HTTP requests):
[.. end of old HTTP header ..]
Transfer-Encoding: chunked\r\n
\r\n
ae9\r\n
<data:0xae9>\r\n
0\r\n
\r\n
HTTP/1.1 200 OK
[.. rest of new HTTP header ..]

 Your patch doesn't skip this and thus only works for the first HTTP
data chunk (DAV servers use multiple in a session).

Ronald



More information about the ffmpeg-devel mailing list