VCL: returning early from a custom function

Dridi Boukelmoune dridi at varni.sh
Wed Apr 11 14:30:11 UTC 2018


> I found some alternatives, though generally they feel uglier.
> Any ideas?

This has been discussed in the past, including the possibility to
return a value, but as of today you can't break out of a subroutine.

https://github.com/varnishcache/varnish-cache/wiki/VIP2%3A-VCL-typed-functions

With this feature you could break out of a subroutine by turning it
into a function that returns VOID. We are not there yet.

Dridi


More information about the varnish-misc mailing list