diff --git a/src/proto_http.c b/src/proto_http.c index fd266730f..33a45e89d 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -3244,6 +3244,11 @@ int http_request_forward_body(struct session *s, struct buffer *req, int an_bit) struct http_txn *txn = &s->txn; struct http_msg *msg = &s->txn.req; + if (req->flags & (BF_SHUTW|BF_WRITE_ERROR|BF_WRITE_TIMEOUT)) { + req->analysers &= ~an_bit; + return 1; + } + if (unlikely(msg->msg_state < HTTP_MSG_BODY)) return 0; @@ -4347,6 +4352,11 @@ int http_response_forward_body(struct session *s, struct buffer *res, int an_bit struct http_txn *txn = &s->txn; struct http_msg *msg = &s->txn.rsp; + if (res->flags & (BF_SHUTW|BF_WRITE_ERROR|BF_WRITE_TIMEOUT)) { + res->analysers &= ~an_bit; + return 1; + } + if (unlikely(msg->msg_state < HTTP_MSG_BODY)) return 0;