MEDIUM: streams: Add a new http action, disable-l7-retry.
Add a new action for http-request, disable-l7-retry, that can be used to
disable any attempt at retry requests (see retry-on) if it fails for any
reason other than a connection failure.
This is useful for example to make sure POST requests aren't retried.
diff --git a/src/stream.c b/src/stream.c
index 58e1cc1..62c5598 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -2341,7 +2341,8 @@
*/
si_b->state = SI_ST_REQ; /* new connection requested */
si_b->conn_retries = s->be->conn_retries;
- if (s->be->retry_type &~ PR_RE_CONN_FAILED)
+ if ((s->be->retry_type &~ PR_RE_CONN_FAILED) &&
+ !(si_b->flags & SI_FL_D_L7_RETRY))
si_b->flags |= SI_FL_L7_RETRY;
}
}