* Fixed call to push_response
[project/luci.git] / libs / httpd / luasrc / httpd / module.lua
index 4bf697744b54bd42417acaaddf2b7a58b03820e7..c53e834b49092bfb370ad679434d460300853173 100644 (file)
@@ -90,20 +90,7 @@ function Handler.process(self, request, sourcein, sinkout, sinkerr)
                end
        end
        
-       
-       -- Print status and headers
-       sinkout("HTTP/1.1 " .. response.status .. " " .. statusmsg[response.status] .. "\r\n")
-       for k, v in pairs(response.headers) do
-               sinkout(k .. ": " .. v .. "\r\n")
-       end
-       
-       -- End of Headers
-       sinkout("\r\n")
-       
-       -- Pump content
-       if sourceout then
-               ltn12.pump.all(sourceout, sinkout)
-       end
+       luci.http.protocol.push_response(request,response, sourceout, sinkout, sinkerr) 
 end