HTTP keep-alive timeout

前端 未结 2 1047
生来不讨喜
生来不讨喜 2020-12-08 09:35

Can I specify the HTTP timeout or does the server impose a value? For example, if I do:

telnet my.server.net 80
Trying X.X.         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 10:09

    The client cannot specify the timeout, it is the server configuration that determines the maximum timeout value. The extra Keep-Alive header can inform the client how long the server is willing to keep the connection open (timeout=N value) and how many requests you can do over the same connection (max=M) before the server will force a close of the connection.

    See also Proper use of KeepAlive in Apache Htaccess

提交回复
热议问题