From 75e2eb66e515c9c5542416746d002b8f750630ff Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 15 Dec 2015 10:41:47 +0100 Subject: [PATCH] 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. --- src/proto_http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto_http.c b/src/proto_http.c index cd3d40608..fbed31e09 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;