]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stream_sock: don't remove BF_EXPECT_MORE and BF_SEND_DONTWAIT on partial...
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Mar 2012 17:10:44 +0000 (18:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Mar 2012 17:10:44 +0000 (18:10 +0100)
commitf17810e4fadcda9e556c1950d49a1617e87486b8
tree5e8ed3324ffe16671ea65f066c3f544c1e0f48be
parent454467849070931e0fd7bd09d62b46fbd4923dc5
BUG/MINOR: stream_sock: don't remove BF_EXPECT_MORE and BF_SEND_DONTWAIT on partial writes

The flags are one-shot but should be maintained over all send() operations
as long as send_max is not flushed. The flags were incidentely cleared once
a complete send() was performed, regardless of the fact that the send()
might have been on the first half of a buffer before a wrapping. The result
is that on wrapping data (eg: which happens often with chunked encoding),
many incomplete segments are transmitted instead of being aggregated.

The fix consists in only flushing the flags only once send_max is empty,
which was the expected behaviour.

This fix should be backported to 1.4 though it is not critical, just sub-optimal.
src/stream_sock.c