aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-01 23:18:29 +0100
committerKim Alvefur <zash@zash.se>2019-11-01 23:18:29 +0100
commit2b035680860450dd6ce9d3b853c26bd900752f8f (patch)
treeceaa9d5250acedb5cdd6fb86c7306dec9921f7af /net
parentf6983a3d514a29fb8eab260f65373523450046cf (diff)
downloadprosody-2b035680860450dd6ce9d3b853c26bd900752f8f.tar.gz
prosody-2b035680860450dd6ce9d3b853c26bd900752f8f.zip
net.http.codes: Avoid implicit number -> string coercion
Diffstat (limited to 'net')
-rw-r--r--net/http/codes.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/codes.lua b/net/http/codes.lua
index 8098b5c3..4327f151 100644
--- a/net/http/codes.lua
+++ b/net/http/codes.lua
@@ -82,5 +82,5 @@ local response_codes = {
-- [512-599] = "Unassigned";
};
-for k,v in pairs(response_codes) do response_codes[k] = k.." "..v; end
+for k,v in pairs(response_codes) do response_codes[k] = ("%03d %s"):format(k, v); end
return setmetatable(response_codes, { __index = function(_, k) return k.." Unassigned"; end })