<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 29, 2016 at 3:30 PM, Nils Goroll <span dir="ltr"><<a href="mailto:slink@schokola.de" target="_blank">slink@schokola.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[..]<br>
Suggestion:<br>
<br>
- retire synthetic and support (un)set (be)resp.body<br>
  (not directly related to the topic, but something we should do<br>
   for consistency)<br></blockquote><div><br></div><div>set (be)resp.body is already supported, but restricted to vcl_backend_error / vcl_synth.</div><div>I did not retire it to maintain compatibility and because I'm was, and still am, unclear as to what the future plans are wrt bodies.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">- add support for (un)set beresp.body to vcl_backend_response<br>
  if used:<br>
  -> short-term: silently abort the backend connection<br>
  -> better: discard-read the response body<br></blockquote><div><br></div><div>I will not object "unset beresp.body" but setting the body in the middle of vcl_backend_response{} feels odd to me.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">- add support for (un)set resp.body to vcl_deliver<br></blockquote><div><br></div><div>Is this the same use case but for hits?</div><div>If so, I'm on the opinion of allowing to unset the body but not generating one, same as above in the vcl_backend_response{} case.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- rename vcl_backend_error to vcl_backend_synth to be consistent<br>
  with the client side<br></blockquote><div><br></div><div>I'd object to this. I think the current name is fine and self-explanatory.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- add status and reason to abandon which get pre-set for the call<br>
  to vcl_synth<br>
<br>
  503 as default<br></blockquote><div><br></div><div>+1</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- add return(backend_synth(status, reason)) to vcl_backend_fetch<br>
  as an easy way to return synthetic content at backend request<br>
  time.<br></blockquote><div><br></div><div>I'm all for adding return(error(code, reason)) to go to vcl_backend_error{}.</div><div>I think this subroutine should not be renamed.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">More thoughts:<br>
<br>
- if we want the (un)set beresp.body, should we maybe have<br>
<br>
        set beresp.body = fetch()<br>
<br>
  also?<br></blockquote><div><br></div><div>I'd prefer to have a way to express the opposite, as in "unset beresp.body".</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  This would be the default if no other beresp.body action happend<br>
  in vcl_backend_response<br>
<br>
Thanks, Nils<br>
<br>
______________________________<wbr>_________________<br>
varnish-dev mailing list<br>
<a href="mailto:varnish-dev@varnish-cache.org">varnish-dev@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/<wbr>varnish-dev</a><br>
</blockquote></div><br></div></div>