feat(uri): update urldecode/1

This commit is contained in:
zhouzb 2021-04-16 19:33:06 +08:00 committed by Rory Z
parent 49502b4e7c
commit 3ae8bae9f3
4 changed files with 4 additions and 25 deletions

View File

@ -222,10 +222,5 @@ format_msg(Message)
format_msg(Message) when is_tuple(Message) ->
iolist_to_binary(io_lib:format("~p", [Message])).
-if(?OTP_RELEASE >= 23).
urldecode(S) ->
[{R, _}] = uri_string:dissect_query(S), R.
-else.
urldecode(S) ->
http_uri:decode(S).
-endif.
emqx_http_lib:uri_decode(S).

View File

@ -301,10 +301,5 @@ format_msg(Message)
format_msg(Message) when is_tuple(Message) ->
iolist_to_binary(io_lib:format("~p", [Message])).
-if(?OTP_RELEASE >= 23).
urldecode(S) ->
[{R, _}] = uri_string:dissect_query(S), R.
-else.
urldecode(S) ->
http_uri:decode(S).
-endif.
emqx_http_lib:uri_decode(S).

View File

@ -74,11 +74,6 @@ merge_maps(Default, New) ->
end
end, Default, New).
-if(?OTP_RELEASE >= 23).
urldecode(S) ->
[{R, _}] = uri_string:dissect_query(S), R.
-else.
urldecode(S) ->
http_uri:decode(S).
-endif.
emqx_http_lib:uri_decode(S).

View File

@ -223,11 +223,5 @@ pipeline([Fun | More], Params) ->
{error, Reason}
end.
-if(?OTP_RELEASE >= 23).
urldecode(S) ->
[{R, _}] = uri_string:dissect_query(S), R.
-else.
urldecode(S) ->
http_uri:decode(S).
-endif.
emqx_http_lib:uri_decode(S).