Is varnish casting boolean to string? -


we have varnish 4.0.3 in live environment. extract code our vcl filein varnish vcl_recv:

set req.http.x-is-static-resource = true; #boolean assignment # code if (req.http.x-is-static-resource == true) { # boolean == boolean ?     # code } 

but hits error:

message vcc-compiler: comparison of different types: string '==' bool ('/etc/varnish/utils.vcl' line 429 pos 37)   if (req.http.x-is-static-resource == true) { ------------------------------------##-------- 

we found kind of assignments in several codes:

i think varnish shouldn't hits error. assign boolean type , expect boolean type, right?

what missing?

thanks

the assignments found not req.http - req.http.[name] way access request header [name]. headers strings, not booleans. can still make work small changes, though:

set req.http.x-is-static-resource = "true"; [...]  if (req.http.x-is-static-resource) { [...] 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -