BUG/MEDIUM: http: set DONTWAIT on data when switching to tunnel mode
authorWilly Tarreau <w@1wt.eu>
Sat, 20 Oct 2012 08:38:09 +0000 (10:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 20 Oct 2012 08:41:37 +0000 (10:41 +0200)
commitfc47f91c9cc66e3652d98deab82d6e5fe3a59711
treef4aa428e1c123dfc71915ce331016fe2921afd85
parent566dc5545bb4c55fdfd883ffa3bdcd6485f6f80e
BUG/MEDIUM: http: set DONTWAIT on data when switching to tunnel mode

Jaroslaw Bojar diagnosed an issue when haproxy switches to tunnel mode
after a transfer. The response data are sent with the MSG_MORE flag,
causing them to be needlessly queued in the kernel. In order to fix this,
we set the CF_NEVER_WAIT flag on the channels when switching to tunnel
mode.

One issue remained with client-side keep-alive : if the response is sent
before the end of the request, it suffers the same issue for the same
reason. This is easily addressed by setting the CF_SEND_DONTWAIT flag
on the channel when the response has been parsed and we're waiting for
the other side.

The same issue is present in 1.4 so the fix must be backported.
src/proto_http.c