Hi, I'm using Http11NioProtocol connector on my Tomcat 6.0.29 instance and I noticed that sometimes I experience strange responses: - 400 - Bad Request, - 505 - HTTP Version Not Supported
My first conclusion was that it's somewhat related to the size of the request (e.g. clearing session cookies always fixed the problem). I then recompiled Tomcat from sources adding some additional logs to Http11NioProcessor and InternalNioInputBuffer classes. I also isolated a test request that always fails on my test server instace and used it as a JMeter test configuration. I'm using the following connector configuration: <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="256" minSpareThreads="32"/> <Connector executor="tomcatThreadPool" acceptorThreadCount="4" useComet="false" address="0.0.0.0" port="4080" protocol="org.apache.coyote.http11.Http11NioProtocol" connectionTimeout="30000" redirectPort="4443" enableLookups="false" /> Looking at my logs I found out that the request fails with the following scenario: InternalNioInputBuffer.parseRequestLine - successfully parses the first request line InternalNioInputBuffer.parseHeader - parses some headers but then fails to read more data and returns with HeaderParseStatus.NEED_MORE_DATA status InternalNioInputBuffer.parseRequestLine - is called again and then tries to parse the remaining headers and fails with 505 since it takes a part of 'User-Agent' header value as a protocol name. Can someone familiar with the Http11NioProtocol connector help me with this problem? I also noticed that when a use a local instance of Tomcat (on the same host as my jmeter) with the same configuration the requests work (I suppose it's because the connection is faster and more data is available in the buffer without delay). Thanks a lot, Olaf Tomczak