diff --git a/lib/csslib.php b/lib/csslib.php index 974ae4a1d0950..6bf15785fe936 100644 --- a/lib/csslib.php +++ b/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'); } diff --git a/lib/jslib.php b/lib/jslib.php index 1d20bbd3b640f..bbfb895e5348a 100644 --- a/lib/jslib.php +++ b/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'); } diff --git a/theme/image.php b/theme/image.php index 75b7c599617bc..fc9402a5c2702 100644 --- a/theme/image.php +++ b/theme/image.php @@ -114,7 +114,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); @@ -206,7 +206,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'); @@ -293,4 +293,4 @@ function cache_image($image, $imagefile, $candidatelocation) { @unlink($cacheimage.'.tmp'); // just in case anything fails } return $cacheimage; -} \ No newline at end of file +} diff --git a/theme/yui_combo.php b/theme/yui_combo.php index bd19b5039cc26..53b0e7f78a819 100644 --- a/theme/yui_combo.php +++ b/theme/yui_combo.php @@ -61,7 +61,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; } @@ -187,7 +187,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)); } diff --git a/theme/yui_image.php b/theme/yui_image.php index 4477a9c36c073..8d3436ec2b459 100644 --- a/theme/yui_image.php +++ b/theme/yui_image.php @@ -92,7 +92,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; } @@ -113,7 +113,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;