Skip to content

Commit

Permalink
Use the raw version of the ETag header so quotes aren't escaped and t…
Browse files Browse the repository at this point in the history
…rim them from it before comparison.
  • Loading branch information
chrismeller committed Nov 25, 2011
1 parent 5dfbd58 commit 0a86a23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/theme.php
Expand Up @@ -333,7 +333,7 @@ public function act_display( $paramarray = array( 'user_filters'=> array() ) )
header('ETag: "' . $etag . '"', true);

if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) ) {
if ( $etag == $_SERVER['HTTP_IF_NONE_MATCH'] ) {
if ( $etag == trim( $_SERVER->raw('HTTP_IF_NONE_MATCH'), '"' ) ) {
header( 'HTTP/1.1 304 Not Modified', true, 304);
header( 'X-Habari-Cache-Match: ETag');
die();
Expand Down

0 comments on commit 0a86a23

Please sign in to comment.