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.
This commit is contained in:
Christopher Faulet 2015-12-15 10:41:47 +01:00 committed by Willy Tarreau
parent 113f7decfc
commit 75e2eb66e5

View File

@ -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;