From: Christopher Faulet Date: Tue, 4 Dec 2018 15:23:54 +0000 (+0100) Subject: BUG/MINOR: proto_htx: Truncate the request when an error is detected X-Git-Tag: v1.9-dev10~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3d480517f4261491c32020acc71489e7b3a53c3;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/proto_htx.c b/src/proto_htx.c index b6c127ef87..e76d0bffc0 100644 --- a/src/proto_htx.c +++ b/src/proto_htx.c @@ -5220,7 +5220,7 @@ static void htx_end_response(struct stream *s) if (unlikely(txn->req.msg_state == HTTP_MSG_ERROR || txn->rsp.msg_state == HTTP_MSG_ERROR)) { - channel_truncate(chn); + channel_truncate(&s->req); channel_abort(&s->req); goto end; } @@ -5292,7 +5292,7 @@ static void htx_end_response(struct stream *s) if (txn->rsp.msg_state == HTTP_MSG_CLOSED) { http_msg_closed: /* drop any pending data */ - channel_truncate(chn); + channel_truncate(&s->req); channel_abort(&s->req); goto end; }