tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 50224] New: Http11NioProtocol closes connection if headers are sent in different TCP segments
Date Fri, 05 Nov 2010 17:54:25 GMT

           Summary: Http11NioProtocol closes connection if headers are
                    sent in different TCP segments
           Product: Tomcat 6
           Version: 6.0.29
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connectors

Ive tested an installation that was configured with Http11NioProtocol. When
sent a HEAD request, the connection just gets closed. With the default HTTP/1.1
connector the HEAD requests gets a proper response. (I'm doing a HEAD / on a
default installation, so it's the default tomcat / page that gets served, not a
custom servlet). I have not checked how this behaves with ordinary GET/POST

The part of the default server.xml that I altered:

      <Connector port="8080"
               noCompressionUserAgents="gozilla, traviata"
               redirectPort="8443" />

This seems to happen when the request headers get sent in several IP packets.
e.g. the HTTP request was:

HEAD / HTTP/1.0\r\n
User-Agent: go http package\r\n

This request got sent in 4 different packets(tcp segments) - discovered with

1. packet: HEAD / HTTP/1.0\r\n
2. packet: Host: web01.myserver.internal\r\n
3. packet: User-Agent: go http package\r\n
4. packet: \r\n

The HTTP/1.1 connector seems to handle the above case fine, responds with 200
OK and a proper response. When the Http11NioProtocol is used, there's no
response, the TCP connection just gets closed from the Tomcat side.

This happens specifically when using the go http library(
run on Fedora 14, below is the simple test case written in go - but I'd guess
there's no guarantee the packets always gets sent in different segments (then
again maybe the go http library disables the Nagle algorithm)

If anyone want to try to reproduce this using go( the simple
test was this program:

package main
import (
func main() {
    resp, err := http.Head("http://web01.myserver.internal/")
    if err != nil {
    } else {

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message