changeset 2445:e822900c87d4

mod_http_upload: Correctly attach extended error information
author Kim Alvefur <zash@zash.se>
date Mon, 16 Jan 2017 01:45:05 +0100
parents 3e9f9cef9c0e
children c563f4d64302
files mod_http_upload/mod_http_upload.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_upload/mod_http_upload.lua	Mon Jan 16 01:44:38 2017 +0100
+++ b/mod_http_upload/mod_http_upload.lua	Mon Jan 16 01:45:05 2017 +0100
@@ -77,9 +77,9 @@
 		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-file-size"):text(tostring(file_size_limit))));
+		origin.send(st.error_reply(stanza, "modify", "not-acceptable", "File too large")
+			:tag("file-too-large", {xmlns=xmlns_http_upload})
+				:tag("max-file-size"):text(tostring(file_size_limit)));
 		return true;
 	end
 	local reply = st.reply(stanza);