changeset 3166:44a187c82b53

mod_http_upload_external: Fix to read content-type from correct place in stanza
author Matthew Wild <mwild1@gmail.com>
date Mon, 02 Jul 2018 12:57:40 +0100
parents 7af4776a5dea
children bedd3f4a8f90
files mod_http_upload_external/mod_http_upload_external.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);