[Varnish] #1249: Undeterministic results in regsub/regsuball

Varnish varnish-bugs at varnish-cache.org
Thu Jan 17 18:43:26 CET 2013

#1249: Undeterministic results in regsub/regsuball
 Reporter:  arthens  |       Owner:
     Type:  defect   |      Status:  closed
 Priority:  normal   |   Milestone:
Component:  build    |     Version:  3.0.3
 Severity:  normal   |  Resolution:  invalid
 Keywords:           |

Comment (by tohide):

 I'm possibly seeing a similar issue using 3.03 on ubuntu 10.04

 I have the following in vcl_recv

   if (req.request == "POST" && req.url ~ "^/foo/bar") {
     ban("req.url ~ "+regsuball(req.url, "code=cotn:([^\&]+)",".*\1.*"));
     return (pass);

 i.e. if a POST is done to

 I'm expecting to see in ban.list :-

 req.url ~ /foo/bar?.*VOD.L.*

 This helps me invalidate a number of URLs that relate to that 'code' under
 that URI structure following a new update.

 However, I'm seeing

 req.url ~ /foo/bar?.*:VOD.L.*&param1=value1&param2=value2

 i.e. I'm seeing values appearing which the regex seems to suggest
 shouldn't be there.

Ticket URL: <https://www.varnish-cache.org/trac/ticket/1249#comment:7>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list