aboutsummaryrefslogtreecommitdiffstats
path: root/net/httpserver.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-08 11:22:21 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-08 11:22:21 +0000
commit03384d466b38f6bd0620f5edfba85da0e21589e6 (patch)
tree4cb6c4ac047850c867a4b7c4a478aa1048c7d729 /net/httpserver.lua
parent46e81c8baf610e532940c1335e827601227f85f0 (diff)
downloadprosody-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)
Diffstat (limited to 'net/httpserver.lua')
-rw-r--r--net/httpserver.lua4
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