mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
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.
This commit is contained in:
parent
9b95d31122
commit
b42a8b6c61
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue