From: Christopher Faulet Date: Tue, 15 Dec 2015 09:41:47 +0000 (+0100) Subject: MINOR: filters/http: Forward remaining data when a channel has no "data" filters X-Git-Tag: v1.7-dev2~110 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75e2eb66e515c9c5542416746d002b8f750630ff;p=thirdparty%2Fhaproxy.git MINOR: filters/http: Forward remaining data when a channel has no "data" filters This is an improvement, especially when the message body is big. Before this patch, remaining data were forwarded when there is no filter on the stream. Now, the forwarding is triggered when there is no "data" filter on the channel. When no filter is used, there is no difference, but when at least one filter is used, it can be really significative. --- diff --git a/src/proto_http.c b/src/proto_http.c index cd3d406086..fbed31e093 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -6845,7 +6845,7 @@ http_msg_forward_body(struct stream *s, struct http_msg *msg) msg->next -= ret; if (!(chn->flags & CF_WROTE_DATA) || msg->sov > 0) msg->sov -= ret; - if (!HAS_FILTERS(s)) + if (!HAS_DATA_FILTERS(s, chn)) msg->chunk_len -= channel_forward(chn, msg->chunk_len); waiting: return 0; @@ -6959,7 +6959,7 @@ http_msg_forward_chunked_body(struct stream *s, struct http_msg *msg) msg->next -= ret; if (!(chn->flags & CF_WROTE_DATA) || msg->sov > 0) msg->sov -= ret; - if (!HAS_FILTERS(s)) + if (!HAS_DATA_FILTERS(s, chn)) msg->chunk_len -= channel_forward(chn, msg->chunk_len); waiting: return 0;