Hi, phk asked me to summarise what's wrong with our range support.
- We don't support multiple ranges (e.g. Range: bytes=0-500,5000-). This is regardless of streaming. - If streaming is enabled, the object is not in the cache, we have a range request and it doesn't specify the last-byte-pos (e.g. bytes=F-), it is a suffix range (e.g. bytes=-L) or a full range (e.g. bytes=F-L) we might return the wrong range based on the so-far fetched object. Using #1643 as base for this example, the following cases will be wrong: bytes=0- will return Content-Range: 0-65535/65536 bytes=65536- will return 416 bytes=32768-131072 will return Content-Range: 32768-65535/65536 bytes=131072-262144 will return 416 bytes=-131072 will return Content-Range: 0-65535/65536 We can send * if we don't know the Content-Length but we need to ensure that we have the minimum required to fulfill the range request. As it stands today, for ranges where first-byte-pos is present but not last-byte-pos (first 2 examples above), turning streaming off would be equivalent as we don't support range requests to the backend. For the remaining 3 examples we need to get up to last-byte-pos in case 3 and 4 and use * if C-L is unknown. For the last case we'll need to fetch the whole object. Unless I'm missing something that's all. Salute.
_______________________________________________ varnish-dev mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
