HTTP保持活动状态超时
问题描述:
我可以指定HTTP超时或服务器是否强加一个值? 例如,如果我这样做:HTTP保持活动状态超时
telnet my.server.net 80
Trying X.X.X.X...
Connected to my.server.net.
Escape character is '^]'.
GET /homepage.html HTTP/1.0
Connection: keep-alive
Host: my.server.net
HTTP/1.1 200 OK
Date: Thu, 03 Oct 2013 09:05:28 GMT
Server: Apache
Last-Modified: Wed, 15 Sep 2010 14:45:31 GMT
ETag: "1af210b-7b-4904d6196d8c0"
Accept-Ranges: bytes
Content-Length: 123
Vary: Accept-Encoding
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
[...]
行:
Keep-Alive: timeout=15, max=100
...指定有一个最大超时100秒,对不对?我怎样才能设置这样的价值?
答
客户端无法指定超时,它是确定最大超时值的服务器配置。额外的Keep-Alive头可以通知客户端服务器多长时间保持连接打开(timeout = N值)以及在服务器强制关闭之前可以通过同一连接执行多少次请求(max = M)的连接。
哦OK,所以'max'值指。我不知道。谢谢! –