[Varnish] #1430: Uncaught syntax error in VCL compiler

Varnish varnish-bugs at varnish-cache.org
Thu Feb 6 18:46:00 CET 2014


#1430: Uncaught syntax error in VCL compiler
----------------------+--------------------
 Reporter:  mcollier  |       Type:  defect
   Status:  new       |   Priority:  low
Milestone:            |  Component:  build
  Version:  3.0.5     |   Severity:  normal
 Keywords:            |
----------------------+--------------------
 I would like to report that the following VCL coding error (on my part)
 will possibly cause a server reboot, or at the very least dysfunctional
 varnish environment.

 I would think the VCL compiler should throw an exception.

 The error I made was in the first if statement which should read:

 {{{
 if(req.http.host == "abc.com" || req.http.host == "123.com") {
 }}}

 Problem Code:
 {{{
 sub vcl_recv {
         if(req.http.host == "abc.com" || "123.com") {
                 include "wordpress-recv.vcl";
         } else if(req.http.host == "xyz.com") {
                 include "drupal-recv.vcl";
         } else if(req.http.host ~ "^(www\.)?blah\.com") {
                 error 750 "http://newblah.com";
         }
         return (lookup);
 }

 }}}

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1430>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list