From: Christopher Faulet Date: Mon, 19 Nov 2018 20:59:00 +0000 (+0100) Subject: BUG/MINOR: proto_htx: Fix request/response synchronisation on error X-Git-Tag: v1.9-dev8~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b42a8b6c61f7387bdf81aa04d485ecef6d4c46c5;p=thirdparty%2Fhaproxy.git BUG/MINOR: proto_htx: Fix request/response synchronisation on error The HTTP transaction must be aborted if an error is detected on any one side. --- diff --git a/src/proto_htx.c b/src/proto_htx.c index c16fc1e294..20689727c5 100644 --- a/src/proto_htx.c +++ b/src/proto_htx.c @@ -4946,7 +4946,8 @@ static void htx_end_request(struct stream *s) h1_msg_state_str(txn->req.msg_state), h1_msg_state_str(txn->rsp.msg_state), s->req.analysers, s->res.analysers); - if (unlikely(txn->req.msg_state == HTTP_MSG_ERROR)) { + if (unlikely(txn->req.msg_state == HTTP_MSG_ERROR || + txn->rsp.msg_state == HTTP_MSG_ERROR)) { channel_abort(chn); channel_truncate(chn); goto end; @@ -5080,7 +5081,8 @@ static void htx_end_response(struct stream *s) h1_msg_state_str(txn->req.msg_state), h1_msg_state_str(txn->rsp.msg_state), s->req.analysers, s->res.analysers); - if (unlikely(txn->rsp.msg_state == HTTP_MSG_ERROR)) { + if (unlikely(txn->req.msg_state == HTTP_MSG_ERROR || + txn->rsp.msg_state == HTTP_MSG_ERROR)) { channel_truncate(chn); channel_abort(&s->req); goto end;