In message <cantn4cqasu33zpgo-0ozdyzrky+ztm4xcs7ht5kkqjep5ed...@mail.gmail.com>
, Martin Blix Grydeland writes:
> Do not retry a backend connection if we have ever read any of the
> request body bytes.
I'm not keen in the pointer retry-arg, it should just be another
return {enum} value, for sanity something like:
-2 body write failed
-1 body read failed
0 no body
1 body successfully transfered.
In reality, the retry decision should not be based on the body-xfer
but on the HTTP request: Only GET and HEAD are really safe to retry.
This can be extended so that if we know that the server never had a
chance to act, we can also retry POST/PUT/... but that is a somewhat
slippery criteria to test, for a relatively small gain.
At some point we probably should bite the bullet and buffer the
request body so we can do this sensibly. That would also allow
people to do things with it from VCL/VMOD.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
[email protected] | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev