Skip to content
Browse files

Merge branch 'm25_MDL-40002_ETag_value_must_be_a_quoted-string' of ht…

…tps://github.com/scara/moodle into MOODLE_25_STABLE
  • Loading branch information...
2 parents 2daa999 + f082c5e commit f60ad3fdff91f152447c8dfc19ff030eadd85e50 @danpoltawski danpoltawski committed Jun 11, 2013
Showing with 13 additions and 13 deletions.
  1. +3 −3 lib/csslib.php
  2. +2 −2 lib/jslib.php
  3. +2 −2 theme/image.php
  4. +2 −2 theme/jquery.php
  5. +2 −2 theme/yui_combo.php
  6. +2 −2 theme/yui_image.php
View
6 lib/csslib.php
@@ -228,7 +228,7 @@ function css_send_ie_css($themename, $rev, $etag, $slasharguments) {
$css .= "\n@import url($relroot/styles.php?theme=$themename&rev=$rev&type=theme);";
}
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
header('Content-Disposition: inline; filename="styles.php"');
header('Last-Modified: '. gmdate('D, d M Y H:i:s', time()) .' GMT');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
@@ -254,7 +254,7 @@ function css_send_ie_css($themename, $rev, $etag, $slasharguments) {
function css_send_cached_css($csspath, $etag) {
$lifetime = 60*60*24*60; // 60 days only - the revision may get incremented quite often
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
header('Content-Disposition: inline; filename="styles.php"');
header('Last-Modified: '. gmdate('D, d M Y H:i:s', filemtime($csspath)) .' GMT');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
@@ -312,7 +312,7 @@ function css_send_unmodified($lastmodified, $etag) {
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Cache-Control: public, max-age='.$lifetime);
header('Content-Type: text/css; charset=utf-8');
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
if ($lastmodified) {
header('Last-Modified: '. gmdate('D, d M Y H:i:s', $lastmodified) .' GMT');
}
View
4 lib/jslib.php
@@ -36,7 +36,7 @@ function js_send_cached($jspath, $etag, $filename = 'javascript.php') {
$lifetime = 60*60*24*60; // 60 days only - the revision may get incremented quite often
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
header('Content-Disposition: inline; filename="'.$filename.'"');
header('Last-Modified: '. gmdate('D, d M Y H:i:s', filemtime($jspath)) .' GMT');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
@@ -86,7 +86,7 @@ function js_send_unmodified($lastmodified, $etag) {
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Cache-Control: public, max-age='.$lifetime);
header('Content-Type: application/javascript; charset=utf-8');
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
if ($lastmodified) {
header('Last-Modified: '. gmdate('D, d M Y H:i:s', $lastmodified) .' GMT');
}
View
4 theme/image.php
@@ -113,7 +113,7 @@
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Cache-Control: public, max-age='.$lifetime);
header('Content-Type: '.$mimetype);
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
die;
}
send_cached_image($cacheimage, $etag);
@@ -205,7 +205,7 @@ function send_cached_image($imagepath, $etag) {
$mimetype = get_contenttype_from_ext($pathinfo['extension']);
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
header('Content-Disposition: inline; filename="'.$imagename.'"');
header('Last-Modified: '. gmdate('D, d M Y H:i:s', filemtime($imagepath)) .' GMT');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
View
4 theme/jquery.php
@@ -118,13 +118,13 @@
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Cache-Control: public, max-age='.$lifetime);
header('Content-Type: '.$mimetype);
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
die;
}
require_once("$CFG->dirroot/lib/xsendfilelib.php");
-header('Etag: '.$etag);
+header('Etag: "'.$etag.'"');
header('Content-Disposition: inline; filename="'.$filename.'"');
header('Last-Modified: '. gmdate('D, d M Y H:i:s', filemtime($file)) .' GMT');
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
View
4 theme/yui_combo.php
@@ -60,7 +60,7 @@
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Cache-Control: public, max-age='.$lifetime);
header('Content-Type: '.$mimetype);
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
die;
}
@@ -223,7 +223,7 @@ function combo_send_cached($content, $mimetype, $etag, $lastmodified) {
header('Cache-Control: public, max-age='.$lifetime);
header('Accept-Ranges: none');
header('Content-Type: '.$mimetype);
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
if (!min_enable_zlib_compression()) {
header('Content-Length: '.strlen($content));
}
View
4 theme/yui_image.php
@@ -103,7 +103,7 @@
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
header('Cache-Control: public, max-age='.$lifetime);
header('Content-Type: '.$mimetype);
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
die;
}
@@ -124,7 +124,7 @@ function yui_image_cached($imagepath, $imagename, $mimetype, $etag) {
header('Accept-Ranges: none');
header('Content-Type: '.$mimetype);
header('Content-Length: '.filesize($imagepath));
- header('Etag: '.$etag);
+ header('Etag: "'.$etag.'"');
if (xsendfile($imagepath)) {
die;

0 comments on commit f60ad3f

Please sign in to comment.
Something went wrong with that request. Please try again.