[PATCH] Allow returning abandon from vcl_backend_error{}

Federico Schwindt fgsch at lodoss.net
Mon Apr 13 12:41:59 CEST 2015


They will need to be different subroutines though since the variables are
different (resp vs beresp).

This means they need to be in sync which adds extra complexity and is error
prone IMO.

On Mon, Apr 13, 2015 at 11:17 AM, Dridi Boukelmoune <dridi at varni.sh> wrote:

> Hi,
>
> This is kind of like how you may duplicate bereq manipulations between
> vcl_miss and vcl_pass with Varnish 3 (no there's vcl_backend_fetch).
>
> A current workaround would be to call custom vcl subs in both
> vcl_synth and vcl_backend_error. Otherwise the patch looks simple
> enough :)
>
> Dridi
>
> On Thu, Apr 9, 2015 at 10:55 PM, Federico Schwindt <fgsch at lodoss.net>
> wrote:
> > Hi,
> >
> > Currently if you want to have all your error handling in a single place,
> > i.e. vcl_synth{}, and you end up in vcl_backend_error{} you have to
> either
> > return retry and then abandon in vcl_backend_fetch{} or return deliver
> and
> > in vcl_deliver{} return synth.
> >
> > I can't think of any reason for not allowing this so the attached patch
> > lifts this restriction.
> >
> > Comments? OKs?
> >
> > _______________________________________________
> > varnish-dev mailing list
> > varnish-dev at varnish-cache.org
> > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20150413/eaa82f8c/attachment.html>


More information about the varnish-dev mailing list