[vlc-devel] [PATCH] http: add support for range response with no end boundary
Steve Lhomme
robux4 at ycbcr.xyz
Mon Jan 22 17:02:21 CET 2018
It doesn't seem to be valid but some servers use that.
Fixes #19384
---
modules/access/http/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/access/http/file.c b/modules/access/http/file.c
index ce101f60d6..2ec2dfd7e8 100644
--- a/modules/access/http/file.c
+++ b/modules/access/http/file.c
@@ -140,6 +140,9 @@ static uintmax_t vlc_http_msg_get_file_size(const struct vlc_http_msg *resp)
uintmax_t end, total;
+ if (sscanf(range, "bytes %*u-/%ju", &total) == 1)
+ return total;
+
switch (sscanf(range, "bytes %*u-%ju/%ju", &end, &total))
{
case 1:
--
2.14.2
More information about the vlc-devel
mailing list