Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19309

Mike Doherty on "[Plugin: W3 Total Cache] Empty Vary HTTP header"

$
0
0

An empty Vary header may be added in PgCache.php at line 1243. I've done the following to remove it:

diff --git a/wp-content/plugins/w3-total-cache/lib/W3/PgCache.php b/wp-content/plugins/w3-total-cache/lib/W3/PgCache.php
index 26f471c..432b6ac 100644
--- a/wp-content/plugins/w3-total-cache/lib/W3/PgCache.php
+++ b/wp-content/plugins/w3-total-cache/lib/W3/PgCache.php
@@ -1239,8 +1239,10 @@ class W3_PgCache {
         /**
          * Add vary header
          */
-        $headers = array_merge($headers, array(
-            'Vary' => $vary));
+        if ( $vary ) {
+            $headers = array_merge($headers, array(
+                'Vary' => $vary));
+        }

         /**
          * Add custom headers

https://wordpress.org/plugins/w3-total-cache/


Viewing all articles
Browse latest Browse all 19309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>