From c5e7b4738f6e2f2bf21da8530ebc4c9887cf1e44 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 21 Nov 2016 12:06:11 +0100 Subject: [PATCH] Fix handling mod_http_upload disco#info queries: need decoded elements As reported in https://www.ejabberd.im/forum/28605/ejabberd-modhttpupload-error-405-not-allowed --- src/mod_http_upload.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod_http_upload.erl b/src/mod_http_upload.erl index 6ad18531c..1abde4f5b 100644 --- a/src/mod_http_upload.erl +++ b/src/mod_http_upload.erl @@ -360,7 +360,8 @@ handle_cast(Request, State) -> -spec handle_info(timeout | _, state()) -> {noreply, state()}. -handle_info({route, From, To, #iq{} = IQ}, State) -> +handle_info({route, From, To, #iq{} = Packet}, State) -> + IQ = xmpp:decode_els(Packet), {Reply, NewState} = case process_iq(From, IQ, State) of R when is_record(R, iq) -> {R, State};