https://issues.apache.org/bugzilla/show_bug.cgi?id=56555
--- Comment #11 from Konstantin Kolinko <knst.koli...@gmail.com> --- > multiple connection headers are allowed and the presence of a connection: > close > will always close the connection? Yes. (and multiple tokens in the same Connection header are allowed). If you strive for cleanness then a) remove "keep-alive" token only, b) remove "Keep-Alive:" header if there is any (a header defined by RFC2068). I do not think that it is worth pursuing. As for OP, I see no sense why they explicitly add a "keep-alive" header. First, container takes care of that (and will use keep-alive whenever possible, taking into account the protocol version and how many keep-alive requests have already been processed). Second, HTTP/1.1 connections are keep-alive by default. No header needed. Third, as this is a header for the current hop/connection only, it further makes no sense to rely on it in an application. Thus I think that the original claim is INVALID. Regarding the original code of AbstractHttp11Processor: I think Tomcat adds keep-alive header in some cases when it should not. Per the above, it does not matter, as the close header wins. The issues are the following: 1) isConnectionClose(headers) call happens in one branch of an if/else only. It shall be called in both cases. 2) If isConnectionClose(headers) returns true, then keepAlive flag shall be set to false and no header added. 3) isConnectionClose( ) method looks for the value of the first header only. It does not enumerate all Connection headers, nor it looks for multiple tokens in the same header. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org