BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/257596

Change subject: varnish: fold stash_cookie into evaluate_cookie
......................................................................

varnish: fold stash_cookie into evaluate_cookie

Change-Id: I84b572c1cbe8eca4082e13581384b19122b91f9e
---
M templates/varnish/text-common.inc.vcl.erb
1 file changed, 5 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/257596/1

diff --git a/templates/varnish/text-common.inc.vcl.erb 
b/templates/varnish/text-common.inc.vcl.erb
index 0f3f35d..cd9ae75 100644
--- a/templates/varnish/text-common.inc.vcl.erb
+++ b/templates/varnish/text-common.inc.vcl.erb
@@ -1,13 +1,5 @@
 // Common functions for the Text/Mobile Varnish clusters
 
-sub stash_cookie {
-       // This header is saved, and restored before sending it to MediaWiki
-       if (req.restarts == 0) {
-               set req.http.X-Orig-Cookie = req.http.Cookie;
-               unset req.http.Cookie;
-       }
-}
-
 sub restore_cookie {
        // Restore the original Cookie header for upstream
        // Assumes client header X-Orig-Cookie has been filtered!
@@ -27,7 +19,11 @@
            && req.url !~ "^/w/load\.php") {
                return (pass);
        } else {
-               call stash_cookie;
+               // This header is saved, and restored before sending it to 
MediaWiki
+               if (req.restarts == 0) {
+                       set req.http.X-Orig-Cookie = req.http.Cookie;
+                       unset req.http.Cookie;
+               }
        }
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/257596
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84b572c1cbe8eca4082e13581384b19122b91f9e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to