local reading = { client }
local message, err
-
- socket.sleep(5)
repeat
-- parse headers
break
end
- coroutine.yield()
-
-- keep-alive
if message.http_version == 1.1 then
close = (message.env.HTTP_CONNECTION == "close")
break;
end
- coroutine.yield()
-
local response, sourceout = host:process(
message, sourcein, sinkerr,
client, io.stderr
self:error( client, 500, "Error processing handler" )
end
- coroutine.yield()
-
-- Post process response
local sinkmode = close and "close-when-done" or "keep-open"