end
until false
- env.SCRIPT_NAME, env.QUERY_STRING = env.REQUEST_URI:match("(.*)%??(.*)")
+ env.SCRIPT_NAME, env.QUERY_STRING = env.REQUEST_URI:match("([^?]*)%??(.*)")
return req
end
local close = false
local stat, code, msg, message, err
- client:setsockopt("socket", "rcvtimeo", 15)
- client:setsockopt("socket", "sndtimeo", 15)
+ client:setsockopt("socket", "rcvtimeo", 5)
+ client:setsockopt("socket", "sndtimeo", 5)
repeat
-- parse headers
end
end
if not headers["Content-Length"] then
- if message.http_version == 1.1 then
+ if message.env.SERVER_PROTOCOL == "HTTP/1.1" then
headers["Transfer-Encoding"] = "chunked"
sinkout = chunksink(client)
else