on vcl_error -> vcl_synth : rather have both?

Nils Goroll slink at schokola.de
Wed Mar 19 17:37:01 CET 2014


editing https://www.varnish-cache.org/trac/wiki/Future_VCL I also removed this
comment regarding "synth everywhere":

	"This eliminates the "error" primitive and reserves vcl_error{} for
	 internally generated errors (like 503)"

reflecting on this again: Is this really the implementation of least
astonishment? It appears to me that having

	- vcl_synth for return (synth(701, "FOO")) and
	- vcl_error for varnish-core-code-induced errors

may help clarity? You could never return error in vcl, but you could return
synth. synth wouldn't close the connection, error would.

In other words, wouldn't it help to know that "I can only have got here by
having been called from some fierce varnish-internal error condition"? Also we
have discussed the question of how to get a workspace for generating errors,
wouldn't it help if we had

	- vcl_synth live on the original session ws and
	- vcl_error use a prestine session ws and copy req over?

Cheers, Nils



More information about the varnish-dev mailing list