diff mod_http_upload/mod_http_upload.lua @ 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 c45ad4b7aaa3
children 131075a3bf0d
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))));