[rtmpdump] [PATCH] expose http client
Antti Ajanki
antti.ajanki at iki.fi
Thu Feb 11 19:35:02 CET 2010
Here is an updated version of the patch. http_get now returns more
refined return codes and 304 should work (untested). It also adds
support for reading responses when Content-Length is unspecified but the
end of the message is signalled by server closing the connection.
Antti
Howard Chu wrote:
> Antti Ajanki wrote:
>> This patch 1) exposes http_get(), 2) makes it callback-based, and 3) adds
>> a bit stricter error checking (all status codes outside [200, 299] are
>> considered as errors).
>
> This isn't quite right. The expected response to the If-Modified-Since
> query is 304 if the target has not been modified. (Of course, the client
> doesn't need to do anything further then, but it is not an error.)
>
> And really, if you want to use this function for more general purposes,
> then it ought to distinguish between 3xx (request OK, URL not
> retrieved), 4xx (URL is invalid), 5xx (server is hosed) and connect
> failure (server didn't answer).
>
>> Motivation for these changes is that rtmpdump-yle
>> needs a simple the http client.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtmpdump-http.diff
Type: text/x-diff
Size: 7921 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/rtmpdump/attachments/20100211/d3e13fdc/attachment.diff>
More information about the rtmpdump
mailing list