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();
@ -208,6 +209,11 @@ function islandora_view_datastream_set_cache_headers(AbstractDatastream $datastr
header("Etag: \"{$datastream->checksum}\"");
}
}
else {
header_remove('Cache-Control');
header_remove('Expires');
}
}
/**
* Get the human readable size of the given datastream.

Loading…
Cancel
Save