diff options
author | Mickael Remond <mremond@process-one.net> | 2016-02-03 19:03:17 +0100 |
---|---|---|
committer | Mickael Remond <mremond@process-one.net> | 2016-02-03 19:03:17 +0100 |
commit | dfc29ea03ca91e1eb5387d93612e2ac4b4b496da (patch) | |
tree | 8a3ab89a7307fb5f4daf9f66b00fe9f16fa36b69 /src/mod_http_upload.erl | |
parent | Remove reference to p1_logger (diff) |
Switch to Fast XML module
Diffstat (limited to 'src/mod_http_upload.erl')
-rw-r--r-- | src/mod_http_upload.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mod_http_upload.erl b/src/mod_http_upload.erl index 36d3626be..5d21b4970 100644 --- a/src/mod_http_upload.erl +++ b/src/mod_http_upload.erl @@ -572,12 +572,12 @@ process_iq(_From, invalid, _State) -> -> {ok, binary(), pos_integer(), binary()} | {error, xmlel()}. parse_request(#xmlel{name = <<"request">>, attrs = Attrs} = Request, Lang) -> - case xml:get_attr(<<"xmlns">>, Attrs) of + case fxml:get_attr(<<"xmlns">>, Attrs) of {value, XMLNS} when XMLNS == ?NS_HTTP_UPLOAD; XMLNS == ?NS_HTTP_UPLOAD_OLD -> - case {xml:get_subtag_cdata(Request, <<"filename">>), - xml:get_subtag_cdata(Request, <<"size">>), - xml:get_subtag_cdata(Request, <<"content-type">>)} of + case {fxml:get_subtag_cdata(Request, <<"filename">>), + fxml:get_subtag_cdata(Request, <<"size">>), + fxml:get_subtag_cdata(Request, <<"content-type">>)} of {File, SizeStr, ContentType} when byte_size(File) > 0 -> case catch jlib:binary_to_integer(SizeStr) of Size when is_integer(Size), Size > 0 -> @@ -796,7 +796,7 @@ store_file(Path, Data, FileMode, DirMode, GetPrefix, Slot, Thumbnail) -> {ok, [{<<"Content-Type">>, <<"text/xml; charset=utf-8">>}], - xml:element_to_binary(ThumbEl)}; + fxml:element_to_binary(ThumbEl)}; pass -> ok end; |