diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-02-08 11:22:21 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-02-08 11:22:21 +0000 |
commit | 03384d466b38f6bd0620f5edfba85da0e21589e6 (patch) | |
tree | 4cb6c4ac047850c867a4b7c4a478aa1048c7d729 | |
parent | 46e81c8baf610e532940c1335e827601227f85f0 (diff) | |
download | prosody-03384d466b38f6bd0620f5edfba85da0e21589e6.tar.gz prosody-03384d466b38f6bd0620f5edfba85da0e21589e6.zip |
net.httpserver: Make request.conn be the server.lua conn instead of the underlying socket (more useful this way)
-rw-r--r-- | net/httpserver.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/httpserver.lua b/net/httpserver.lua index 6ebfcb76..79705e6f 100644 --- a/net/httpserver.lua +++ b/net/httpserver.lua @@ -214,7 +214,7 @@ end function new_request(handler) - return { handler = handler, conn = handler.socket, + return { handler = handler, conn = handler, write = function (...) return handler:write(...); end, state = "request", server = http_servers[handler:serverport()], send = send_response, @@ -236,7 +236,7 @@ function destroy_request(request) end request.handler:close() if request.conn then - listener.ondisconnect(request.handler, "closed"); + listener.ondisconnect(request.conn, "closed"); end end end |