aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/files.lua
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
commit8902c6ae9e7d10ec62227abb7a3b9bbf2a77f9c8 (patch)
tree7ea82083a46d00a5b9c423367f5af6fbbd465bc2 /net/http/files.lua
parent9ae0da672746701c2be437e4cd1716d306ce14a8 (diff)
downloadprosody-8902c6ae9e7d10ec62227abb7a3b9bbf2a77f9c8.tar.gz
prosody-8902c6ae9e7d10ec62227abb7a3b9bbf2a77f9c8.zip
net.http.files: Explicitly convert number to string, avoiding implicit coercion
Diffstat (limited to 'net/http/files.lua')
-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