diff options
author | Kim Alvefur <zash@zash.se> | 2019-10-12 19:30:29 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-10-12 19:30:29 +0200 |
commit | 9ae0da672746701c2be437e4cd1716d306ce14a8 (patch) | |
tree | 1968f0896b4b58351e9010f37d031a23ddbe0c72 /net/http | |
parent | 165db3098de67c7cca33ecbe0e41a9dafc61d056 (diff) | |
download | prosody-9ae0da672746701c2be437e4cd1716d306ce14a8.tar.gz prosody-9ae0da672746701c2be437e4cd1716d306ce14a8.zip |
net.http.server: Explicitly convert number to string, avoiding implicit coercion
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/server.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/server.lua b/net/http/server.lua index b649ff5f..bf24c97e 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -314,7 +314,7 @@ end function _M.send_response(response, body) if response.finished then return; end body = body or response.body or ""; - response.headers.content_length = #body; + response.headers.content_length = ("%d"):format(#body); if response.is_head_request then return _M.send_head_response(response) end |