diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-04-04 18:27:44 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-04-04 18:27:44 +0100 |
commit | bef96be8a083272ef67fc19e8e6654659a2d19c5 (patch) | |
tree | 5d889dd44eb613a90e5beaeb919e59602fdf55c8 /net | |
parent | d28da6dd6c58a20d29276033b8c03ad8003853d6 (diff) | |
download | prosody-bef96be8a083272ef67fc19e8e6654659a2d19c5.tar.gz prosody-bef96be8a083272ef67fc19e8e6654659a2d19c5.zip |
net.http: Fix parameter order to http request callbacks
Commit e3b9dc9dd940 changed the parameter order in 2013, but did not update the names of the parameters in the callback function. Due to this inconsistency, 12df41a5a4b1 accidentally reversed the order when fixing the variable names without fixing where they are used.
Additionally the documentation was incorrect (since 2013), and this has also now been fixed.
Diffstat (limited to 'net')
-rw-r--r-- | net/http.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http.lua b/net/http.lua index 8364a104..cc67a45c 100644 --- a/net/http.lua +++ b/net/http.lua @@ -238,7 +238,7 @@ local function request(self, u, ex, callback) end log("debug", "Request '%s': Calling callback, status %s", req.id, code or "---"); - return log_if_failed(req.id, xpcall(function () return callback(content, code, request, response) end, handleerr)); + return log_if_failed(req.id, xpcall(function () return callback(content, code, response, request) end, handleerr)); end req.reader = request_reader; req.state = "status"; |