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 | 0817fc87bbce5084cdd67276869680128191a916 (patch) | |
tree | ceaa9d5250acedb5cdd6fb86c7306dec9921f7af /net/http | |
parent | 8216017ab5628bd82ac8226c568e492da45ef61a (diff) | |
download | prosody-0817fc87bbce5084cdd67276869680128191a916.tar.gz prosody-0817fc87bbce5084cdd67276869680128191a916.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 }) |