BUG/MEDIUM: streams: Don't give up if we couldn't send the request.
In htx_request_forward_body(), don't give up if we failed to send the request,
and we have L7 retries activated. If we do, we will not retry when we should.
This should be backported to 2.0.
diff --git a/src/proto_htx.c b/src/proto_htx.c
index d5119c1..cbe5c84 100644
--- a/src/proto_htx.c
+++ b/src/proto_htx.c
@@ -1163,6 +1163,12 @@
/* Output closed while we were sending data. We must abort and
* wake the other side up.
*/
+ /* Don't abort yet if we had L7 retries activated and it
+ * was a write error, we may recover.
+ */
+ if (!(req->flags & (CF_READ_ERROR | CF_READ_TIMEOUT)) &&
+ (s->si[1].flags & SI_FL_L7_RETRY))
+ return 0;
msg->err_state = msg->msg_state;
msg->msg_state = HTTP_MSG_ERROR;
htx_end_request(s);