]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] http: fix possible incorrect forwarded wrapping chunk size (take 2)
authorWilly Tarreau <w@1wt.eu>
Tue, 1 Mar 2011 19:04:36 +0000 (20:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 27 Mar 2011 18:00:03 +0000 (20:00 +0200)
Fix acd20f80 was incomplete, the computed "bytes" value was not used.

This fix must be backported to 1.4.

src/proto_http.c

index c00aced6cc92f645e21b62eb12a29a806a1cfd6a..057cd4f0f23192f22ead35643b17f4856a5cee19 100644 (file)
@@ -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;
        }