mod_http_oauth2: Pedantic optimization
Checking the length of the string seems like 30% more expensive than
comparing it with the empty string (by reference, probably).
--- a/mod_http_oauth2/mod_http_oauth2.lua Sat Mar 25 20:18:05 2023 +0100
+++ b/mod_http_oauth2/mod_http_oauth2.lua Sun Mar 26 14:37:42 2023 +0200
@@ -335,7 +335,7 @@
local function get_auth_state(request)
local form = request.method == "POST"
and request.body
- and #request.body > 0
+ and request.body ~= ""
and request.headers.content_type == "application/x-www-form-urlencoded"
and http.formdecode(request.body);