Browse Source

Respond with the same headers as we did before, if caching is disabled.

pull/393/head
Adam Vessey 11 years ago
parent
commit
dca15b1ccd
  1. 6
      includes/datastream.inc

6
includes/datastream.inc

@ -191,6 +191,7 @@ function islandora_view_datastream_cache_check(AbstractDatastream $datastream) {
* The datastream being viewed/downloaded.
*/
function islandora_view_datastream_set_cache_headers(AbstractDatastream $datastream) {
if (variable_get('islandora_use_datastream_cache_headers', TRUE)) {
// Force cache revalidation.
header('Expires: Sun, 19 Nov 1978 05:00:00 GMT');
$cache_control = array();
@ -207,6 +208,11 @@ function islandora_view_datastream_set_cache_headers(AbstractDatastream $datastr
if (isset($datastream->checksum)) {
header("Etag: \"{$datastream->checksum}\"");
}
}
else {
header_remove('Cache-Control');
header_remove('Expires');
}
}
/**

Loading…
Cancel
Save