diff --git a/src/proto_http.c b/src/proto_http.c index f813e1cf6..2c5045c95 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -5025,6 +5025,12 @@ int http_request_forward_body(struct session *s, struct channel *req, int an_bit /* in most states, we should abort in case of early close */ channel_auto_close(req); + if (req->to_forward) { + /* We can't process the buffer's contents yet */ + req->flags |= CF_WAKE_WRITE; + goto missing_data; + } + while (1) { if (msg->msg_state == HTTP_MSG_DATA) { /* must still forward */ @@ -6194,6 +6200,12 @@ int http_response_forward_body(struct session *s, struct channel *res, int an_bi } } + if (res->to_forward) { + /* We can't process the buffer's contents yet */ + res->flags |= CF_WAKE_WRITE; + goto missing_data; + } + if (unlikely(s->comp_algo != NULL) && msg->msg_state < HTTP_MSG_TRAILERS) { /* We need a compression buffer in the DATA state to put the * output of compressed data, and in CRLF state to let the