aboutsummaryrefslogtreecommitdiffstats
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
commit0817fc87bbce5084cdd67276869680128191a916 (patch)
treeceaa9d5250acedb5cdd6fb86c7306dec9921f7af
parent8216017ab5628bd82ac8226c568e492da45ef61a (diff)
downloadprosody-0817fc87bbce5084cdd67276869680128191a916.tar.gz
prosody-0817fc87bbce5084cdd67276869680128191a916.zip
net.http.codes: Avoid implicit number -> string coercion
-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 })