防止Tomcat发送header“Connection:close" [英] Prevent Tomcat from sending header "Connection: close"
本文介绍了防止Tomcat发送header“Connection:close"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的 Tomcat Websocket 服务器在通过 https 连接的回复标头中具有双重属性Connection":upgrade"和close".不适用于通过 http 的连接,仅在此处升级".这将导致 Safari 断开连接.如何防止连接:关闭"出现在标题中?
My Tomcat Websocket Server has the attribute "Connection" double in the reply header for connections via https: "upgrade" and "close". Not for connections via http, only "upgrade" here. This will cause Safari to disconnect. How can I prevent "Connection: close" from appearing in the header?
连接器配置:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="" keystorePass="" />
推荐答案
我可以通过更改到 Tomcat 9.0.8 来解决问题.我继续使用相同的连接器配置.
I could solve the problem by changing to Tomcat 9.0.8. I continue to use the same connector configuration.
这篇关于防止Tomcat发送header“Connection:close"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文