* Use CRLF instead of LF in HTTP headers
authorSteven Barth <steven@midlink.org>
Tue, 17 Jun 2008 16:23:42 +0000 (16:23 +0000)
committerSteven Barth <steven@midlink.org>
Tue, 17 Jun 2008 16:23:42 +0000 (16:23 +0000)
libs/httpd/luasrc/httpd/module.lua

index bb22798..4bf6977 100644 (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 of Headers
        end
        
        -- End of Headers
-       sinkout("\n")
+       sinkout("\r\n")
        
        -- Pump content
        if sourceout then
        
        -- Pump content
        if sourceout then