Skip to content

Commit a930e99

Browse files
committed
BUG/MINOR: Don't report early srv aborts on request forwarding in DONE state
L7-retries may be ignored if server aborts are detected during the request forwarding, when the request is already in DONE state. When a request was fully processed (so in HTTP_MSG_DONE state) and is waiting for be forwarded to the server, there is a test to detect server aborts, to be able to report the error. However, this test must be skipped if the response was not received yet, to let the reponse analyszers handle the abort. It is important to properly handle the retries. This test must only be performed if the response analysis was finished. It means the response must be at least in HTTP_MSG_BODY state. This patch should be backported as far as 2.8.
1 parent f065d00 commit a930e99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/http_ana.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
10121012
* response. Otherwise, let a change to forward the response
10131013
* first.
10141014
*/
1015-
if (htx_is_empty(htxbuf(&s->res.buf))) {
1015+
if (txn->rsp.msg_state >= HTTP_MSG_BODY && htx_is_empty(htxbuf(&s->res.buf))) {
10161016
COUNT_IF(1, "Server abort during request forwarding");
10171017
goto return_srv_abort;
10181018
}

0 commit comments

Comments
 (0)