From bf4a95e6a3a84b35b5a9efbe903c9c6f9523854a Mon Sep 17 00:00:00 2001 From: Matteo Scaramuccia Date: Sat, 1 Jun 2013 12:34:40 +0200 Subject: [PATCH] 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 --- lib/filelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/filelib.php b/lib/filelib.php index 1820beac83c..24aa51970af 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -1956,7 +1956,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; -- 2.43.0