BBlack has submitted this change and it was merged.

Change subject: Remove optional alpha character at the end of the X-CS
......................................................................


Remove optional alpha character at the end of the X-CS

Until we implement support for multiple ip ranges per carrier with different 
rules,
we allow several json configurations to refer to the same carrier.
Their X-CS ID will only differ by an extra letter appended to their ID, e.g. 
"250-99a"
In order for analytics to report correct stats, remove it before modifying 
X-Analytics.

Change-Id: If425dff13fe20b6a43897b54b24780eebc4c50dc
---
M templates/varnish/zero.inc.vcl.erb
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/templates/varnish/zero.inc.vcl.erb 
b/templates/varnish/zero.inc.vcl.erb
index 4411780..94ceb4f 100644
--- a/templates/varnish/zero.inc.vcl.erb
+++ b/templates/varnish/zero.inc.vcl.erb
@@ -302,6 +302,13 @@
           Note that vcl_deliver in other files may also modify X-Analytics
        */
        if (req.http.X-CS && resp.http.X-Analytics !~ "zero=") {
+
+               // Until we implement support for multiple ip ranges per 
carrier with different rules,
+               // we allow several json configurations to refer to the same 
carrier.
+               // Their X-CS ID will only differ by an extra letter appended 
to their ID, e.g. "250-99a"
+               // In order for analytics to report correct stats, remove it 
before modifying X-Analytics.
+               set req.http.X-CS = regsub(req.http.X-CS, "[a-z]$", "");
+
                // "zero=" might have been cached by previous version, avoid 
duplicates per bug 62922
                // Assuming 3 month caching, the !~ "zero=" check can be 
removed after 6/20/2014.
                if (resp.http.X-Analytics) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If425dff13fe20b6a43897b54b24780eebc4c50dc
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yurik <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Dfoy <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to