From 398145c10946bd93ba44f1b99fedd1d1ce85f8bc Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 12 Apr 2013 00:31:05 +0100 Subject: net.http: Swap response and request parameters passed to callback (will break some modules) --- net/http.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net') diff --git a/net/http.lua b/net/http.lua index b3bd5a67..4eb4a2ac 100644 --- a/net/http.lua +++ b/net/http.lua @@ -76,8 +76,7 @@ local function request_reader(request, data) if not data then return; end local function success_cb(r) if request.callback then - for k,v in pairs(r) do request[k] = v; end - request.callback(r.body, r.code, request, r); + request.callback(r.body, r.code, r, request); request.callback = nil; end destroy_request(request); -- cgit v1.2.3