From de26c59000e8760f9cd32aeb8ebadfc23789b16f Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Mon, 16 Oct 2017 16:00:59 -0300 Subject: [PATCH] Move redirect to a particular case to not break existing behavior. --- includes/datastream.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/datastream.inc b/includes/datastream.inc index a93b4c60..e7547780 100644 --- a/includes/datastream.inc +++ b/includes/datastream.inc @@ -65,11 +65,6 @@ function islandora_view_datastream(AbstractDatastream $datastream, $download = F } header("Content-Disposition: attachment; filename=\"$filename\""); } - else { - if ($datastream->controlGroup == 'R') { - drupal_goto($datastream->url); - } - } $cache_check = islandora_view_datastream_cache_check($datastream); if ($cache_check !== 200) { @@ -91,6 +86,11 @@ function islandora_view_datastream(AbstractDatastream $datastream, $download = F // to receive content for playback. $chunk_headers = FALSE; if (isset($_SERVER['HTTP_RANGE'])) { + // XXX: Can't make assertions on byte ranging of redirect datastreams. + // @see https://jira.duraspace.org/browse/ISLANDORA-2084. + if (!$download && $datastream->controlGroup == 'R') { + drupal_goto($datastream->url); + } // Set headers specific to chunking. $chunk_headers = islandora_view_datastream_set_chunk_headers($datastream); }