lighttpd强制关闭连接 [英] lighttpd force close connection
问题描述
我有一个M2M项目,它发出以下标头.
I have a M2M project that sends out the following headers.
HTTP/1.1
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: xxx.xxx.xxx.xxx:xxxx
RANGE:bytes=0-1023
Connection: Keep-Alive
Apache和ISS在响应标头中具有 connection:close
,无论对 keep-alive
的请求如何.我认为Lighttpd实际上可以正常运行,因为它可以保持连接有效,或者不发送 connection:close
.我实际上需要它来关闭M2M机器的连接才能正常工作.我尝试过
Apache and ISS have connection : close
in the response headers, regardless of the request to keep-alive
. Lighttpd I assume is actually performing correctly as it does keep the connection alive, or does not send a connection : close
. I actually need it to close the connection for the M2M machine to work. I tried
setenv.add-response-header = ( "connection" => "close" )
但这是否被忽略了,还是要强制关闭连接?
But this is ignored, anyway to force a connection close?
推荐答案
您可以通过修改 server.max-keep-alive-idle
来实现.如果将其设置为 0
,则在提供数据后,连接将立即关闭
You can do this by modifying server.max-keep-alive-idle
. If you set this to 0
, then the connection will close right after the data is served
这篇关于lighttpd强制关闭连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!