* libs/httpd: cleanup
[project/luci.git] / libs / httpd / luasrc / httpd / server.lua
index 181ca24..5722164 100644 (file)
@@ -90,7 +90,7 @@ end
 function Server.error(self, socket, code, msg)
        hcode = tostring(code)
        
-       socket:send( "HTTP/1.1 " .. hcode .. " " ..
+       socket:send( "HTTP/1.0 " .. hcode .. " " ..
         luci.http.protocol.statusmsg[code] .. "\r\n" )
        socket:send( "Connection: close\r\n" )
        socket:send( "Content-Type: text/plain\r\n\r\n" )
@@ -119,8 +119,6 @@ function Server.process( self, thread )
        local reading = { client }
 
        local message, err
-
-       socket.sleep(5)
        
        repeat
                -- parse headers
@@ -131,8 +129,6 @@ function Server.process( self, thread )
                        break
                end     
                
-               coroutine.yield()
-               
                -- keep-alive
                if message.http_version == 1.1 then
                        close = (message.env.HTTP_CONNECTION == "close")
@@ -176,8 +172,6 @@ function Server.process( self, thread )
                        break;
                end
                
-               coroutine.yield()
-               
                local response, sourceout = host:process(
                        message, sourcein, sinkerr,
                        client, io.stderr 
@@ -186,8 +180,6 @@ function Server.process( self, thread )
                        self:error( client, 500, "Error processing handler" )
                end
                
-               coroutine.yield()
-               
                -- Post process response
                local sinkmode = close and "close-when-done" or "keep-open"