[Varnish] #238: regsub only replaces one occurance
Varnish
varnish-bugs at projects.linpro.no
Fri May 9 01:26:47 CEST 2008
#238: regsub only replaces one occurance
----------------------+-----------------------------------------------------
Reporter: galaxor | Owner: phk
Type: defect | Status: new
Priority: high | Milestone:
Component: varnishd | Version: trunk
Severity: major | Keywords:
----------------------+-----------------------------------------------------
In the manpage, it says that regsub "[r]eturns a copy of str with all
occurrences of the regular expression regex replaced with sub".
In reality, it only replaces the *first* occurrence. Since vcl doesn't
have loops, it is highly inconvenient to replace all. (It could probably
be done by including some C, I guess...?)
This patch brings the reality in line with the documentation, by making
regsub replace *all* occurrences.
It's a patch against r2617.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/238>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list