Diff

mod_http_upload/mod_http_upload.lua @ 1850:e3a0ebe671cc

mod_http_upload: Include failure reason in error response
author Kim Alvefur <zash@zash.se>
date Mon, 14 Sep 2015 12:45:00 +0200
parent 1849:5244c9b0b297
child 1851:03c5639882a7
line wrap: on
line diff
--- a/mod_http_upload/mod_http_upload.lua	Mon Sep 14 12:44:10 2015 +0200
+++ b/mod_http_upload/mod_http_upload.lua	Mon Sep 14 12:45:00 2015 +0200
@@ -43,7 +43,7 @@
 	-- validate
 	local filename = request:get_child_text("filename");
 	if not filename or filename:find("/") then
-		origin.send(st.error_reply(stanza, "modify", "bad-request"));
+		origin.send(st.error_reply(stanza, "modify", "bad-request", "Invalid filename"));
 		return true;
 	end
 	local reply = st.reply(stanza);