1

I can't get my head around multipart ranges usage. Sounds interesting but in what way it is beneficial? How a client can use such a response? and how content-length became 804??

(5−0)+(15−9)+(3587−3147)+3 = 454
$ curl -X GET -H "Range: bytes=0-5, 9-15, 3147-3587" http://dl11.f2m.io/film/The.Spy.Gone.North.2018.720p.BluRay.Film2Movie_WS.mkv
HTTP/1.1 206 Partial Content
Server: nginx
Date: Sat, 13 Apr 2019 10:48:16 GMT
Content-Type: multipart/byteranges; boundary=00000000000000000008
Content-Length: 804
Last-Modified: Sat, 13 Apr 2019 09:23:42 GMT
Connection: keep-alive
ETag: "5cb1aa9e-51539d77"

--00000000000000000008
Content-Type: application/octet-stream
Content-Range: bytes 0-5/1364434295

�Eߣ�B
--00000000000000000008
Content-Type: application/octet-stream
Content-Range: bytes 9-15/1364434295

B��B�
--00000000000000000008
Content-Type: application/octet-stream
Content-Range: bytes 3147-3587/1364434295


--00000000000000000008--

If i wanted to download the resource in parallel (threading) i could use multiple Range requests.

$ curl -X GET -H "Range: bytes=0-5" {url}
$ curl -X GET -H "Range: bytes=9-15" {url}
$ curl -X GET -H "Range: bytes=3147-3587" {url}

So what is multipart ranges usage?

pouya
  • 3,400
  • 6
  • 38
  • 53

0 Answers0