]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[OPTIM] http: don't send each chunk in a separate packet
authorWilly Tarreau <w@1wt.eu>
Wed, 1 Dec 2010 23:37:14 +0000 (00:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 1 Dec 2010 23:39:33 +0000 (00:39 +0100)
commit57f5c12c04986950668e85f4aeece906905f74d3
treec7e341c604b2c0ce18f14bce82c9412ce3291478
parent342b11c4d4fff7611dd8fbd5e9333f344cfdd984
[OPTIM] http: don't send each chunk in a separate packet

When forwarding chunk-encoded data, each chunk gets a TCP PUSH flag when
going onto the wire simply because the send() function does not know that
some data remain after it (next chunk). Now we set the BF_EXPECT_MORE flag
on the buffer if the chunk size is not null. That way we can reduce the
number of packets sent, which is particularly noticeable when forwarding
compressed data, especially as it requires less ACKs from the client.
src/proto_http.c