Changeset

2208:e654d6e1fb50

mod_http_upload: Log if file size exceeds limit
author Kim Alvefur <zash@zash.se>
date Sun, 12 Jun 2016 03:21:48 +0200
parents 2207:c45ad4b7aaa3
children 2209:2733cb8c82a9
files mod_http_upload/mod_http_upload.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_upload/mod_http_upload.lua	Sun Jun 12 02:51:08 2016 +0200
+++ b/mod_http_upload/mod_http_upload.lua	Sun Jun 12 03:21:48 2016 +0200
@@ -67,6 +67,7 @@
 		origin.send(st.error_reply(stanza, "modify", "bad-request", "Missing or invalid file size"));
 		return true;
 	elseif filesize > file_size_limit then
+		module:log("debug", "File too large (%d > %d)", filesize, file_size_limit);
 		origin.send(st.error_reply(stanza, "modify", "not-acceptable", "File too large",
 			st.stanza("file-too-large", {xmlns=xmlns_http_upload})
 				:tag("max-size"):text(tostring(file_size_limit))));