The initial request contains "Range: 0-", which servers normally
have responded with "HTTP/1.1 206 Partial Content" reply with
a Content-Range header, which was used as indicator for seekability.
Apache, since 2.2.20, responds with "HTTP/1.1 200 OK" for these
requests, which is more friendly to caches and proxies, but the
seekability still is indicated via the Accept-Ranges: bytes header.
Signed-off-by: Martin Storsjö <martin@martin.st>
currently libavformat only allows seeking if a request with "Range:
0-" results in a 206 reply from the HTTP server which includes a
Content-Range header. But according to RFC 2616, the server may also
reply with a normal 200 reply (which is more efficient for a request
for the whole file). In fact Apache HTTPD 2.2.20 has changed the
behaviour in this way and it looks like this change will be kept in
future versions. The fix for libavformat is easy: Also look at the
Accept-Ranges header.
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.
This breaks API.
Amazon S3 sends header field names all lowercase.
This is actually acceptable according to the HTTP standard.
http://tools.ietf.org/html/rfc2616#section-4.2
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
(cherry picked from commit c6610a216e)
ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.
Originally committed as revision 23822 to svn://svn.ffmpeg.org/ffmpeg/trunk
Also make the RTSP protocol use url_alloc and url_connect instead of relying
on the delay open behaviour.
Originally committed as revision 23710 to svn://svn.ffmpeg.org/ffmpeg/trunk
connection (e.g. a seek). This fixes the theoretical case where a server
sends a file first using chunked encoding, and then using non-chunked
encoding.
Originally committed as revision 23665 to svn://svn.ffmpeg.org/ffmpeg/trunk
them from being sent using chunked encoding (I don't think this ever happened,
but either way it would be wrong).
Originally committed as revision 23664 to svn://svn.ffmpeg.org/ffmpeg/trunk
This makes url_fsize return correct values for delay opened connections
that have not yet been initialized.
This fixes using the image2 demuxer with http sources.
Originally committed as revision 23546 to svn://svn.ffmpeg.org/ffmpeg/trunk
If http_connect fails, we've already stored the new connection handle in s->hd,
so clear it so http_close won't double-free it.
10l to me for not spotting it during review
Originally committed as revision 23529 to svn://svn.ffmpeg.org/ffmpeg/trunk
Initialize the buffer av_strlcatf writes into.
Add the dash at the end of the Range header.
10l to me for not spotting it earlier
Originally committed as revision 23528 to svn://svn.ffmpeg.org/ffmpeg/trunk
The connection is made on the first http_read, http_write or http_seek.
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23525 to svn://svn.ffmpeg.org/ffmpeg/trunk