HA-Proxy version 1.4.25 (available in f20 as well) always expects he will close the connection first,
however it not MUST be true with all kind of headers and HTTP version.
If the `nc web server` started in similar way:
busybox nc -ll -p 9002 -e sh -c "echo -ne 'HTTP/1.1 200 OK\r\nContent-Length: 8\r\nConnection: close\r\nContent-Type: text/html; charset=UTF-8\r\n\r\nserver2\n'; cat >/dev/null" &
lets the haproxy to close the connection first.
HA-Proxy 1.5.0 works better (compiled with TARGET=linux2628), when the server closes the connection immediately after the response served.
I suggest to use "echo 'myhttpresponse '; cat >/dev/null" as server command, it works well with both version of haproxy.
No left-over cat processes detected.
The connection expected to be closed by all proxy/client when they receive a response with correct Content-length header and a 'Connection: close' header.
HA-Proxy version 1.4.25 (available in f20 as well) always expects he will close the connection first,
however it not MUST be true with all kind of headers and HTTP version.
If the `nc web server` started in similar way: Length: 8\r\nConnection: close\r\ nContent- Type: text/html; charset= UTF-8\r\ n\r\nserver2\ n'; cat >/dev/null" &
busybox nc -ll -p 9002 -e sh -c "echo -ne 'HTTP/1.1 200 OK\r\nContent-
lets the haproxy to close the connection first.
HA-Proxy 1.5.0 works better (compiled with TARGET=linux2628), when the server closes the connection immediately after the response served.
I suggest to use "echo 'myhttpresponse '; cat >/dev/null" as server command, it works well with both version of haproxy.
No left-over cat processes detected.
The connection expected to be closed by all proxy/client when they receive a response with correct Content-length header and a 'Connection: close' header.