aboutsummaryrefslogtreecommitdiffstats
path: root/net/httpserver.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-22 04:44:26 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-22 04:44:26 +0000
commit54d5d4f69dd41f033163828c24424a4e4ff8d25b (patch)
tree26739691c526ec3566886472ec2fd583ef923b2d /net/httpserver.lua
parent31dd61128403f0af9e2482856ec95d18c85f79d5 (diff)
downloadprosody-54d5d4f69dd41f033163828c24424a4e4ff8d25b.tar.gz
prosody-54d5d4f69dd41f033163828c24424a4e4ff8d25b.zip
net.httpserver, net.http: Update for new net.server API (untested)
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 ddb4475c..51dca166 100644
--- a/net/httpserver.lua
+++ b/net/httpserver.lua
@@ -209,7 +209,7 @@ end
function new_request(handler)
return { handler = handler, conn = handler.socket,
- write = handler.write, state = "request",
+ write = function (...) return handler:write(...); end, state = "request",
server = http_servers[handler.serverport()],
send = send_response,
destroy = destroy_request,
@@ -230,7 +230,7 @@ function destroy_request(request)
end
request.handler.close()
if request.conn then
- listener.disconnect(request.handler, "closed");
+ listener.ondisconnect(request.handler, "closed");
end
end
end