aboutsummaryrefslogtreecommitdiffstats
path: root/net/http.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/http.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/http.lua')
-rw-r--r--net/http.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/http.lua b/net/http.lua
index 9d2f9b96..34ec11b4 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -152,7 +152,7 @@ function request(u, ex, callback)
end
req.handler, req.conn = server.wrapclient(socket.tcp(), req.host, req.port or 80, listener, "*a");
- req.write = req.handler.write;
+ req.write = function (...) return req.handler:write(...); end
req.conn:settimeout(0);
local ok, err = req.conn:connect(req.host, req.port or 80);
if not ok and err ~= "timeout" then
@@ -200,7 +200,7 @@ end
function destroy_request(request)
if request.conn then
request.handler.close()
- listener.disconnect(request.conn, "closed");
+ listener.ondisconnect(request.conn, "closed");
end
end