diff --git a/src/proto_http.c b/src/proto_http.c index bab3db5d8..ef5a15ccb 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -6853,6 +6853,9 @@ http_msg_forward_body(struct stream *s, struct http_msg *msg) if (msg->next) goto waiting; + if (unlikely(!(chn->flags & CF_WROTE_DATA) || msg->sov > 0)) + msg->sov -= ret; + FLT_STRM_DATA_CB(s, chn, flt_http_end(s, msg), /* default_ret */ 1, /* on_error */ goto error, @@ -6968,6 +6971,9 @@ http_msg_forward_chunked_body(struct stream *s, struct http_msg *msg) if (msg->next) goto waiting; + if (unlikely(!(chn->flags & CF_WROTE_DATA) || msg->sov > 0)) + msg->sov -= ret; + FLT_STRM_DATA_CB(s, chn, flt_http_end(s, msg), /* default_ret */ 1, /* on_error */ goto error,