Prevent Tomcat from sending header “Connection: close”

↘锁芯ラ 提交于 2019-12-24 22:19:04

问题


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 configuration :

<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="" />


回答1:


I could solve the problem by changing to Tomcat 9.0.8. I continue to use the same connector configuration.



来源:https://stackoverflow.com/questions/50529119/prevent-tomcat-from-sending-header-connection-close

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!