I've run across some peculiar behavior with the NIO2
connector in Tomcat 8.5.23
Here is how I am using it:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Nio2Protocol"
SSLEnabled="true"
sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImplementation"
maxThreads="200"
minSpareThreads="25"
scheme="https"
secure="true"
keystoreFile="/path/to/keystore.jks"
keystorePass="key-pass"
clientAuth="false"
ciphers="long,list,of,ciphers"/>
Now what happens is, if I happen to POST and the request includes the Header: 'Cache-Control: max-age=0'
then the form parameters are not there when I try to retrieve them. I've tried putting in a filter to try and grab them and/or the body itself at the very beginning of the filter chain but it is already too late - the body has been consumed, and there are no parameters. The request structure does however show that the body is of the correct size, so it would appear not to be a network issue.
I would normally think I had something configured incorrectly, but everything works fine under Http11NioProtocol
.
Any suggestions - aside from not using Nio2
?