]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[OPTIM] stream_sock: avoid fast-forwarding of partial data
authorWilly Tarreau <w@1wt.eu>
Wed, 11 May 2011 18:32:36 +0000 (20:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 30 May 2011 16:42:41 +0000 (18:42 +0200)
commit22be90b8db8393392e5b46b7dfff6f702db58687
treec04855ff2934852ee3a8e4e2e4edbce5ef9caa9a
parent0729303fb0a4d43df35f0bf00619154a93345788
[OPTIM] stream_sock: avoid fast-forwarding of partial data

Fast-forwarding between file descriptors is nice but can be counter-productive
when only one part of the buffer is forwarded, because it can result in doubling
the number of send() syscalls. This is what happens on HTTP chunking, because
the chunk data are sent, then the CRLF + next chunk size are parsed and immediately
scheduled for forwarding. This results in two send() for the same block while a
single one would have done it.
src/stream_sock.c