Re: http-server-close problem (also with Tomcat backend)

From: Willy Tarreau <w#1wt.eu>
Date: Thu, 1 Apr 2010 23:36:09 +0200


On Thu, Apr 01, 2010 at 11:32:29AM +0200, Patrik Nilsson wrote:
> Hi,
>
> 2010/3/30 Óscar Frías Barranco <ofrias#gmail.com>:
> <...>
> > It seems to me that when http-server-close option is enabled, haproxy
> > replaces the original request header "Connection: Keep-Alive" by
> > "Connection: close".  And this change is making Tomcat change its behavior:
> > when it receives a "Connection: close" it does not use chunked transfer
> > encoding.  Instead, Tomcat replies with a "Connection: close" response
> > header and a non-chunked response whose length is indicated by closing the
> > connection.
>
> Are you only seeing this problem for responses with chunked transfer
> encoding in Tomcat? In Jetty, we are seeing a similar issue with
> simple responses with a Content-length header. If there is a
> "Connection: close" header in the request, Jetty returns a response
> without the Content-length header.

Well, that just confirms that we need to implement Cyril's workaround in haproxy anyway because there is no reason to be only one such funny implementation ; as I said in my earlier mail, in my experience it unfortunately appears to be very common to reinvent HTTP specs among java developers, probably in part because HTTP is very permissive and some people tend to consider that if they see something working once, it means everything's OK :-/

So let's stay on the safe side and add an option to workaround those misdesigns.

Willy Received on 2010/04/01 23:36

This archive was generated by hypermail 2.2.0 : 2010/04/01 23:45 CEST