diff options
author | Kim Alvefur <zash@zash.se> | 2019-10-12 19:31:48 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-10-12 19:31:48 +0200 |
commit | 9e6dce07bf7a9836eb8123bf198c8671d423157f (patch) | |
tree | 7ea82083a46d00a5b9c423367f5af6fbbd465bc2 | |
parent | 30a72c72a392fdbee1e91946c9a72ed88a20b232 (diff) | |
download | prosody-9e6dce07bf7a9836eb8123bf198c8671d423157f.tar.gz prosody-9e6dce07bf7a9836eb8123bf198c8671d423157f.zip |
net.http.files: Explicitly convert number to string, avoiding implicit coercion
-rw-r--r-- | net/http/files.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/files.lua b/net/http/files.lua index 7ff81fc8..650c6f47 100644 --- a/net/http/files.lua +++ b/net/http/files.lua @@ -127,7 +127,7 @@ local function serve(opts) local content_type = ext and mime_map[ext]; response_headers.content_type = content_type; if attr.size > cache_max_file_size then - response_headers.content_length = attr.size; + response_headers.content_length = ("%d"):format(attr.size); log("debug", "%d > cache_max_file_size", attr.size); return response:send_file(f); else |