Help on converting this V3 line to V4

Jennings III, Raymond raymond.jennings at nytimes.com
Thu Mar 19 15:07:01 CET 2015


(1)
I changed vcl_error to vcl_backend_error but having a problem with the
internal syntax.  I used to have:

sub vcl_backend_error {

 synthetic {"<p>"} + obj.response + {"</p>"};
 return(deliver);
}

(2)
I also had this line in my V3 vcl

error 200 "BAN Set for " + req.url;

Does this get converted to:

set resp.status = 200;
synthetic("BAN Set for " + req.url);
return(deliver);


The Upgrading page says this:

error() is now synth()
<https://www.varnish-cache.org/docs/trunk/whats-new/upgrading.html#error-is-now-synth>

And you must explicitly return it:

return (synth(999, "Response"));


Not sure exactly what is going on here.

Thanks for any insight.

Ray
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20150319/f369b3c7/attachment.html>


More information about the varnish-misc mailing list