Commit 9f4a3ba2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

http: explicitly allow deflate & gzip encoding in live streams

This explicitly allows the server to return gzip or deflate
Content-Encoding.

This is not explicitly allowed for normal streams because
Content-Encoding breaks use of bytes ranges. Seeking offsets and size
would be in terms of the compressed stream. This would prevent VLC
demuxers from seeking or estimating duration.

The HTTP origin server can still return Content-Encoding in any case as
VLC does not explicitly forbid it (with Accept-Encoding: identity).
However in practice, servers will not perform opportunistic on-the-fly
compression.
parent f0e6ad4f
...@@ -40,11 +40,7 @@ struct vlc_http_live ...@@ -40,11 +40,7 @@ struct vlc_http_live
static int vlc_http_live_req(struct vlc_http_msg *req, static int vlc_http_live_req(struct vlc_http_msg *req,
const struct vlc_http_resource *res, void *opaque) const struct vlc_http_resource *res, void *opaque)
{ {
#if 0 // TODO
vlc_http_msg_add_header(req, "Accept-Encoding", "gzip, deflate"); vlc_http_msg_add_header(req, "Accept-Encoding", "gzip, deflate");
#else
(void) req;
#endif
(void) res; (void) res;
(void) opaque; (void) opaque;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment