Yurik has uploaded a new change for review.

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

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/134525/1

diff --git a/templates/varnish/zero.inc.vcl.erb 
b/templates/varnish/zero.inc.vcl.erb
index bfa7b4b..110ac3e 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: newchange
Gerrit-Change-Id: If425dff13fe20b6a43897b54b24780eebc4c50dc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yurik <[email protected]>

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

Reply via email to