mod_http_upload_external: Fix to read content-type from correct place in stanza
authorMatthew Wild <mwild1@gmail.com>
Mon, 02 Jul 2018 12:57:40 +0100
changeset 3170 44a187c82b53
parent 3169 7af4776a5dea
child 3171 bedd3f4a8f90
mod_http_upload_external: Fix to read content-type from correct place in stanza
mod_http_upload_external/mod_http_upload_external.lua
--- a/mod_http_upload_external/mod_http_upload_external.lua	Mon Jul 02 12:56:51 2018 +0100
+++ b/mod_http_upload_external/mod_http_upload_external.lua	Mon Jul 02 12:57:40 2018 +0100
@@ -94,7 +94,7 @@
 	local request = stanza.tags[1];
 	local filename = request:get_child_text("filename");
 	local filesize = tonumber(request:get_child_text("size"));
-	local filetype = request.attr["content-type"] or "application/octet-stream";
+	local filetype = request:get_child_text("content-type") or "application/octet-stream";
 
 	local get_url, put_url = handle_request(
 		origin, stanza, legacy_namespace, filename, filesize, filetype);