Changeset

8706:e2919978673e

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.
author Matthew Wild <mwild1@gmail.com>
date Wed, 04 Apr 2018 18:27:44 +0100
parents 8705:1d66f66a13c9
children 8707:fd39c44c0113 8708:c53e9e27acc6
files net/http.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/http.lua	Wed Mar 28 18:11:09 2018 +0200
+++ b/net/http.lua	Wed Apr 04 18:27:44 2018 +0100
@@ -238,7 +238,7 @@
 		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";