[Varnish] #249: regsub
Varnish
varnish-bugs at projects.linpro.no
Thu Jun 12 16:21:15 CEST 2008
#249: regsub
--------------------+-------------------------------------------------------
Reporter: ebik | Owner: des
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Keywords:
--------------------+-------------------------------------------------------
Replacement string parsing is broken in current trunk.
First of all, when handling $0, ..., $9 there shoud be used 's' instead of
'sub'. Strage
things happen when you try using them now.
Second '&' is valid url character thus it should not be replaced in any
case. Moreover
it does the same as $0, thus the if (*s == '&') branch is not needed at
all.
Third, if we want to send "$0" to server we cannot, thus I suggest "$$" to
translate as "$".
Then "$$0" translates to "$0".
I'm attaching proposal patch.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/249>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list