X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=libs%2Flucid-http%2Fluasrc%2Flucid%2Fhttp%2Fserver.lua;h=95484a02f0bdd49c834aecfef45a90f81c010c4c;hb=f242ed5aba13e432c16e29b606c2c9a899e5fad2;hp=008fd1fc2d84006e4e43a1078c8071c3b7dee54f;hpb=fa25902656c6deaa1b1d8b8276d2c6cdf5686e5e;p=oweals%2Fluci.git diff --git a/libs/lucid-http/luasrc/lucid/http/server.lua b/libs/lucid-http/luasrc/lucid/http/server.lua index 008fd1fc2..95484a02f 100644 --- a/libs/lucid-http/luasrc/lucid/http/server.lua +++ b/libs/lucid-http/luasrc/lucid/http/server.lua @@ -344,7 +344,7 @@ function Server.parse_headers(self, source) 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 @@ -432,6 +432,8 @@ function Server.process(self, client, env) else return self:error(client, 411, statusmsg[411]) end + + close = true else return self:error(client, 405, statusmsg[405]) end @@ -453,7 +455,7 @@ function Server.process(self, client, env) 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