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)

}