diff --git a/include/class.http.php b/include/class.http.php
index 3baea958a9495b3e8967510818f36cb561069ec4..18eeb2e1be6db38e00abd8ac3adc4c5632cd7d41 100644
--- a/include/class.http.php
+++ b/include/class.http.php
@@ -70,7 +70,7 @@ class Http {
         header('Expires: ' . gmdate(DATE_RFC822, time() + $ttl)." GMT");
         header('Pragma: private');
         if (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified ||
-            @trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) {
+            @trim($_SERVER['HTTP_IF_NONE_MATCH'], '" ') == $etag) {
                 header("HTTP/1.1 304 Not Modified");
                 exit();
         }