mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-29 09:41:21 +02:00
BUG/MINOR: proto_htx: Truncate the request when an error is detected
When HTTP_MSGF_ERROR is set on a channel (the request or the response), the request must be truncated, not the response.
This commit is contained in:
parent
1a7ad7ad18
commit
f3d480517f
@ -5220,7 +5220,7 @@ static void htx_end_response(struct stream *s)
|
|||||||
|
|
||||||
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)) {
|
txn->rsp.msg_state == HTTP_MSG_ERROR)) {
|
||||||
channel_truncate(chn);
|
channel_truncate(&s->req);
|
||||||
channel_abort(&s->req);
|
channel_abort(&s->req);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
@ -5292,7 +5292,7 @@ static void htx_end_response(struct stream *s)
|
|||||||
if (txn->rsp.msg_state == HTTP_MSG_CLOSED) {
|
if (txn->rsp.msg_state == HTTP_MSG_CLOSED) {
|
||||||
http_msg_closed:
|
http_msg_closed:
|
||||||
/* drop any pending data */
|
/* drop any pending data */
|
||||||
channel_truncate(chn);
|
channel_truncate(&s->req);
|
||||||
channel_abort(&s->req);
|
channel_abort(&s->req);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user