Some of my services return video - I am wondering if there’s a good way to detect that an inbound request is a range request vs. perhaps the original request of the resource. My current test is to see if the header Range is either not present, or is present and starts with the string “bytes=0-”. I also make sure the request is a GET (because it appears that some browsers do a HEAD to see if range requests are supported).
This test doesn’t seem to work in all cases.
The reasons I want to detect this is 1) accurate logging of how many videos have been requested, and 2) I want to send some extra information back in the response headers for the first request.