diff options
author | Kim Alvefur <zash@zash.se> | 2019-11-01 23:18:29 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-11-01 23:18:29 +0100 |
commit | 2b035680860450dd6ce9d3b853c26bd900752f8f (patch) | |
tree | ceaa9d5250acedb5cdd6fb86c7306dec9921f7af /net/http | |
parent | f6983a3d514a29fb8eab260f65373523450046cf (diff) | |
download | prosody-2b035680860450dd6ce9d3b853c26bd900752f8f.tar.gz prosody-2b035680860450dd6ce9d3b853c26bd900752f8f.zip |
net.http.codes: Avoid implicit number -> string coercion
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/codes.lua | 2 |
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 }) |