* Use CRLF instead of LF in HTTP headers

This commit is contained in:
Steven Barth 2008-06-17 16:23:42 +00:00
parent 71beb64a22
commit 304ce583c7

View file

@ -92,13 +92,13 @@ function Handler.process(self, request, sourcein, sinkout, sinkerr)
-- Print status and headers -- Print status and headers
sinkout("HTTP/1.1 " .. response.status .. " " .. statusmsg[response.status] .. "\n") sinkout("HTTP/1.1 " .. response.status .. " " .. statusmsg[response.status] .. "\r\n")
for k, v in pairs(response.headers) do for k, v in pairs(response.headers) do
sinkout(k .. ": " .. v .. "\n") sinkout(k .. ": " .. v .. "\r\n")
end end
-- End of Headers -- End of Headers
sinkout("\n") sinkout("\r\n")
-- Pump content -- Pump content
if sourceout then if sourceout then