From: Willy Tarreau Date: Tue, 1 Mar 2011 19:04:36 +0000 (+0100) Subject: [BUG] http: fix possible incorrect forwarded wrapping chunk size (take 2) X-Git-Tag: v1.5-dev8~256 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26f0f17200989fab8563eadd01fbe9e85e5ec348;p=thirdparty%2Fhaproxy.git [BUG] http: fix possible incorrect forwarded wrapping chunk size (take 2) Fix acd20f80 was incomplete, the computed "bytes" value was not used. This fix must be backported to 1.4. --- diff --git a/src/proto_http.c b/src/proto_http.c index c00aced6cc..057cd4f0f2 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -5578,7 +5578,7 @@ int http_response_forward_body(struct session *s, struct buffer *res, int an_bit int bytes = msg->sov - msg->som; if (bytes < 0) /* sov may have wrapped at the end */ bytes += res->size; - buffer_forward(res, msg->sov - msg->som + msg->chunk_len); + buffer_forward(res, bytes + msg->chunk_len); msg->chunk_len = 0; /* don't forward that again */ msg->som = msg->sov; }