lighttpd 强制关闭连接
我有一个 M2M 项目,它发送以下标头。
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 实际上执行正确,因为它确实保持连接处于活动状态,或者不发送连接:关闭
。我实际上需要它来关闭 M2M 机器的连接才能工作。我尝试过
setenv.add-response-header = ( "connection" => "close" )
但这被忽略了,无论如何要强制关闭连接吗?
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 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过修改
server.max-keep-alive-idle
来做到这一点。如果您将其设置为0
,那么连接将在数据提供后立即关闭You can do this by modifying
server.max-keep-alive-idle
. If you set this to0
, then the connection will close right after the data is served