On Wed, Jan 30, 2013 at 05:16:26PM -0800, Bryan Talbot wrote:
> http-pretend-keepalive still enables keep-alive to the client like
> http-server-close does.
> 
> The difference is that http-server-close sends a Connection: close to the
> backend to indicate it doesn't intend to use keep alive.  This however
> confuses some tomcat versions and causes them to act like the request was
> using HTTP 1.0 and (i think) send a connection: close in the response which
> is what your client is seeing.  http-pretend-keepalive makes haproxy not
> send that Connection: close to the backend but then it closes the
> connection anyway.

It's not just a matter of Connection header or HTTP version, the real issue
is that the server fails to announce the content-length nor chunked encoding,
making it impossible to maintain the connection alive with the client because
there is no other way to end the response than by closing. And you're perfectly
right, using http-pretend-keepalive forces tomcat to emit these precious
headers to delimit the response, allowing the front connection to remain
alive.

Willy


Reply via email to