Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit c8d8b400f9568d4e5e54606aa5e6cac4f6d20af2 1 parent 6ef0160
@scara scara authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/filelib.php
View
2  lib/filelib.php
@@ -2004,7 +2004,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;
Please sign in to comment.
Something went wrong with that request. Please try again.