@@ -1769,13 +1769,17 @@ parse_endpoint(undefined) ->
1769
1769
parse_endpoint (Destination ) when is_binary (Destination ) ->
1770
1770
parse_endpoint (unicode :characters_to_list (Destination ));
1771
1771
parse_endpoint (Destination ) when is_list (Destination ) ->
1772
- case re :split (Destination , " /" , [{ return , list }] ) of
1772
+ case string :split (Destination , " /" , all ) of
1773
1773
[Name ] ->
1774
1774
{ok , {queue , unescape (Name )}};
1775
- [" " , Type | Rest ]
1776
- when Type =:= " exchange" orelse Type =:= " queue" orelse
1777
- Type =:= " topic" orelse Type =:= " temp-queue" ->
1778
- parse_endpoint0 (atomise (Type ), Rest );
1775
+ [" " , " exchange" | Rest ] ->
1776
+ parse_endpoint0 (exchange , Rest );
1777
+ [" " , " queue" | Rest ] ->
1778
+ parse_endpoint0 (queue , Rest );
1779
+ [" " , " topic" | Rest ] ->
1780
+ parse_endpoint0 (topic , Rest );
1781
+ [" " , " temp-queue" | Rest ] ->
1782
+ parse_endpoint0 (temp_queue , Rest );
1779
1783
[" " , " amq" , " queue" | Rest ] ->
1780
1784
parse_endpoint0 (amqqueue , Rest );
1781
1785
[" " , " reply-queue" = Prefix | [_ |_ ]] ->
@@ -1902,9 +1906,6 @@ new_amqqueue(QNameBin0, Type, Params0, _State = #proc_state{user = #user{usernam
1902
1906
to_url ([]) -> [];
1903
1907
to_url (Lol ) -> " /" ++ string :join (Lol , " /" ).
1904
1908
1905
- atomise (Name ) when is_list (Name ) ->
1906
- list_to_atom (re :replace (Name , " -" , " _" , [{return ,list }, global ])).
1907
-
1908
1909
unescape (Str ) -> unescape (Str , []).
1909
1910
1910
1911
unescape (" %2F" ++ Str , Acc ) -> unescape (Str , [$/ | Acc ]);
0 commit comments