[Varnish] #1251: Regsuball doesn't replace all occurrences
Varnish
varnish-bugs at varnish-cache.org
Mon Jan 21 14:14:16 CET 2013
#1251: Regsuball doesn't replace all occurrences
--------------------+----------------------
Reporter: tmotyl | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: 2.1.5 | Severity: normal
Keywords: |
--------------------+----------------------
It seems that regsuball is not replacing all occurances of a regular
expression.
I have code like this in my ACL
{{{
set req.url = regsuball(req.url, "(\?|&)(utm_[a-zA-Z]+)=[^&]+&?", "\1");
}}}
for url's like
{{{
/uk/sale.html?utm_medium=game&utm_source=ad+network&utm_campaign=post+holiday+sale&utm_content=320x50
}}}
Varnish returns
{{{
/uk/sale.html?utm_source=ad+network&utm_content=320x50
}}}
I also tried
{{{
set req.url = regsuball(req.url,
"(\?|&)(utm_source|utm_medium|utm_content|utm_campaign)=[^&]+&?", "\1");
}}}
but the result is the same.
I'm using Varnish 2.1.5 on ubuntu.
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1251>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list