How to force Tomcat server to send the Keep-alive header in http response

后端 未结 1 1575
太阳男子
太阳男子 2021-01-12 08:43

We have an application running on a tomcat 7 server, and we want the http responses that send back to the client has the keep-alive header in it. Is there a way to change so

相关标签:
1条回答
  • 2021-01-12 09:47

    In HTTP/1.1, connections are assumed to be keep-alive, unless otherwise specified (by "Connection: close" header). Therefore it is usually unnecessary to explicitly set keep-alive header.

    Of course, you can always add a servlet filter that sets whatever headers that you need.

    0 讨论(0)
提交回复
热议问题