nginx的408错误


client_header_timeout:Http核心模块指令,指令指定读取客户端请求头标题的超时时间。
这里的超时是指一个请求头没有进入读取步骤,如果连接超过这个时间而客户端没有任何响应,Nginx将返回一个"Request time out" (408)错误。

client_body_timeout:Http核心模块指令,指令指定读取请求实体的超时时间。
这里的超时是指一个请求实体没有进入读取步骤,如果连接超过这个时间而客户端没有任何响应,Nginx将返回一个"Request time out" (408)错误

客户端请求加个headers

local response_body = {}
local post_data = 'asd';
res, code = http.request{
url = "http://127.0.0.1/post.php",
method = "POST",
headers =
{
["Content-Type"] = "application/x-www-form-urlencoded",
["Content-Length"] = #post_data,
},
source = ltn12.source.string('data=' .. post_data),
sink = ltn12.sink.table(response_body)
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM