我正在发送一个请求,其中包括媒体,并具有大约200k的contentLength。当发送到非SSL端口时,它工作得很好,但是当发送到SSL端口时,请求的读取器的ByteBuffer并不包含所有请求。我认为这与appReadBufSize设置有关。
一个较短的255字节的SSL请求可以很好地工作-所以问题不在于SSL,而在于长度。
我认为应该可以将长SSL请求传递给Tomcat,但是没有找到任何关于SSL和非SSL处理长请求的区别的参考。连接器使用openssl。
server.xml连接器定义:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000" maxPostSize="-1"
maxThreads="150" SSLEnabled="true" sslProtocol="TLS"
scheme="https" secure="true" clientAuth="false"
... SSL keystore definitions/>请指教,非常感谢,尤瓦尔
发布于 2020-07-23 23:00:40
事实证明,Tomcat中确实存在一个bug:http://tomcat.10.x6.nabble.com/Bug-64486-New-Receiving-null-empty-request-body-when-SSL-enabled-td5099846.html
我在Ubunto 20下运行Tomcat 9.0.31。当升级到Tomcat 9.0.37 (手动安装)时,这个问题消失了。
https://stackoverflow.com/questions/63050276
复制相似问题