vcl_backend_error changes
Nils Goroll
slink at schokola.de
Thu Dec 1 15:20:29 CET 2016
So here's the second suggestion update from the "thoughts about vcl cleanup
around ..." thread:
* add status and reason to abandon which get pre-set for the call to
vcl_synth
vcl_backend_fetch {
return (abandon(901, "coming from vcl_backend_fetch"));
}
vcl_backend_response {
return (abandon(902, "coming from vcl_backend_response"));
}
vcl_backend_error {
return (abandon(903, "coming from vcl_backend_error"));
}
vcl_synth {
# resp.status is now 901, 902 or 903 for the cases above
# resp.reason is set to "coming from ..."
}
* add return(error(status, reason)) to fail to vcl_backend_error
and have status and reason pre-set
vcl_backend_fetch {
return (error(901, "coming from vcl_backend_fetch"));
}
vcl_backend_response {
return (error(902, "coming from vcl_backend_response"));
}
vcl_backend_error {
# beresp.status is now 901 or 902 for the cases above
# beresp.reason is set to "coming from ..."
}
Nils
More information about the varnish-dev
mailing list