5 ms·
I would have never thought one could request multiple ranges in the first place. How does that work (multiple connections?) and of what use it is?
by aw3c2 15y ago
I would have never thought one could request multiple ranges in the first place. How does that work (multiple connections?) and of what use it is?
- kevingadd 15y agoOne hypothetical use would be for dealing with formats that have both headers and footers: For example, an MP3 will have a frame header at the start of every frame, so you'd want the beginning of the file to get that header. But you'd also want the last few KB of the MP3, because ID3 tags go there.
- pielud 15y agoYou make a request for several ranges of a file using the range header, something like: Range: bytes=100-200, 600-800, 1500- If the server supports ranges, it will respond with a 206 Partial Content status, and send a multipart/byteranges response body, which looks like this http://www.freesoft.org/CIE/RFC/2068/225.htm http://www.freesoft.org/CIE/RFC/2068/225.htm. Basically a delimited string containing all the ranges. This is useful for some streaming audio/video formats and especially for large pdfs. IIRC, pdfs typically have header information at the end of the file, so it's useful for a pdf reader to get the end of the file first.