Maybe I've found an haproxy bug? I am wondering if anyone else can reproduce this -
You'll need to send two requests w/ keep-alive: curl -v -v -v http://127.0.0.1/something http://127.0.0.1/ On my system the first request returns a 404 error (but I've also seen this with 200 responses - the 404 was highly customized with a chunked response body, and the 200 also had a chunked response body, but I don't know that the chunked encoding is relevant or not), and the second request returns a 504 error (gateway timeout) - in this case haproxy is timing out the connection after 15 seconds. When you run curl the first request will happen just fine (you'll get the 404 response) and the second request will time out, at which point the connection will close with no response of any sort. (curl tries to be smart and will resend the request after the connection closes, but it does note the connection dies) I'm using Haproxy 1.5.12 and can reproduce this at will.

