BBlack has submitted this change and it was merged.

Change subject: Fix regex bug in 36e9fd2a (which was a fix for ae30ae0b)
......................................................................


Fix regex bug in 36e9fd2a (which was a fix for ae30ae0b)

In PCRE regexes, (?!) is a negative look-ahead assertion,
whereas (?<!) is a negative look-behind assertion.

The previous iteration of this regex was trying to use
look-ahead as look-behind.  The net result was that the
gettingStartedUserToken= cookies were still causing
cache differentiation.  I also re-ordered things a bit
so that the look-behind is only in the Token part of the
alternation.

Change-Id: I5fa388888794ed069bbfc2cf2e411e94ad96500e
---
M templates/varnish/text-common.inc.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  BBlack: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/varnish/text-common.inc.vcl.erb 
b/templates/varnish/text-common.inc.vcl.erb
index 2c1b8f8..f6e8a43 100644
--- a/templates/varnish/text-common.inc.vcl.erb
+++ b/templates/varnish/text-common.inc.vcl.erb
@@ -39,7 +39,7 @@
        /* gettingStarted exclusion is to work around e.g. 
enwikigettingStartedUserToken=
         * which probably shouldn't end in Token= ...
         */
-       if (req.http.Cookie ~ "(?!gettingStartedUser)([sS]ession|Token)=") {
+       if (req.http.Cookie ~ "([sS]ession|(?<!gettingStartedUser)Token)=") {
                set req.hash_ignore_busy = true;
        } else {
                call cookie_munging;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fa388888794ed069bbfc2cf2e411e94ad96500e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <bbl...@wikimedia.org>
Gerrit-Reviewer: BBlack <bbl...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to