aboutsummaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-10-12 19:31:48 +0200
committerKim Alvefur <zash@zash.se>2019-10-12 19:31:48 +0200
commit9e6dce07bf7a9836eb8123bf198c8671d423157f (patch)
tree7ea82083a46d00a5b9c423367f5af6fbbd465bc2 /net/http
parent30a72c72a392fdbee1e91946c9a72ed88a20b232 (diff)
downloadprosody-9e6dce07bf7a9836eb8123bf198c8671d423157f.tar.gz
prosody-9e6dce07bf7a9836eb8123bf198c8671d423157f.zip
net.http.files: Explicitly convert number to string, avoiding implicit coercion
Diffstat (limited to 'net/http')
-rw-r--r--net/http/files.lua2
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