lighttpd force close connection

好久不见. 提交于 2021-01-28 05:36:43

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/6453661/lighttpd-force-close-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!