mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-39832 Files: Fixed ETag format according with RFC2616.
ETag must be double quoted, http://tools.ietf.org/html/rfc2616#section-3.11: entity-tag = [ weak ] opaque-tag weak = "W/" opaque-tag = quoted-string
This commit is contained in:
parent
264631cdc8
commit
78030f9db1
1 changed files with 1 additions and 1 deletions
|
@ -1955,7 +1955,7 @@ function readfile_accel($file, $mimetype, $accelerate) {
|
|||
header('Last-Modified: '. gmdate('D, d M Y H:i:s', $lastmodified) .' GMT');
|
||||
|
||||
if (is_object($file)) {
|
||||
header('ETag: ' . $file->get_contenthash());
|
||||
header('Etag: "' . $file->get_contenthash() . '"');
|
||||
if (isset($_SERVER['HTTP_IF_NONE_MATCH']) and $_SERVER['HTTP_IF_NONE_MATCH'] === $file->get_contenthash()) {
|
||||
header('HTTP/1.1 304 Not Modified');
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue