Status: In Review
Resolution: Ready for Test
Affects Version/s: None
Fix Version/s: None
Component/s: Islandora Module (Core)
When a byte range request is requested for a R or E datastream it will return a 416 HTTP response code as it does not have the content length of the datastream. The expected behvior would be to let the web server of the requested resource dictate how it's served up. However, given the current expected behavior of the islandora_view_datastream function (https://github.com/Islandora/islandora/blob/7.x/includes/datastream.inc#L32) it's being served up via the getDatastreamDissemination call to Fedora (https://github.com/islandora/tuque/blob/1.x/Datastream.php#L942-L944). Similarly, the download behavior will serve up a file on download and redirecting will also make this behavior change. The change in the code will only change how byte range request on view operates.
Looking into this uncovers another issue that likely exists with E datastreams. That is, as there is no size/content length stored on the datastream it'd be impossible for byte range requests to be resolvable. A potential solution would be to a HEAD request but Fedora did not support HEAD requests until 3.8.1 and the underlying resolution for E control groups may not itself support it. This should be discussed and addressed in another ticket.
To duplicate, construct a redirect datastream in the devel block:
Now do a CURL request against it (substitute yourhostname with the URL of the box being tested on):
After the pull request you'll see: