[Varnish] #539: unable to compare two headers in vcl

Varnish varnish-bugs at projects.linpro.no
Mon Aug 17 14:30:03 CEST 2009


#539: unable to compare two headers in vcl
----------------------+-----------------------------------------------------
 Reporter:  hamnis    |        Owner:  phk   
     Type:  defect    |       Status:  closed
 Priority:  normal    |    Milestone:        
Component:  varnishd  |      Version:  trunk 
 Severity:  critical  |   Resolution:  fixed 
 Keywords:            |  
----------------------+-----------------------------------------------------
Changes (by phk):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 The exact scenario you propose is unlikely to be possible, because
 compiling regular expressions is horribly expensive (malloc overhead
 amongst other things).

 The other half of it, is that it is so suicidal to allow a client to send
 you regexps that it defies description.

 (In VCL we precompile the regular expressions at load-time to minimize
 this overhead.)

 In r4186 I have changed the VCL compiler so that the "==" and "!="
 operators take general
 strings as arguments, so replacing your "~" with "==" the above should now
 be possible.

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/539#comment:2>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list