http/1.1 detection

This commit is contained in:
Steven Barth 2009-05-27 19:12:58 +00:00
parent fa25902656
commit 693366bdd8

View file

@ -453,7 +453,7 @@ function Server.process(self, client, env)
end end
end end
if not headers["Content-Length"] then 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" headers["Transfer-Encoding"] = "chunked"
sinkout = chunksink(client) sinkout = chunksink(client)
else else