@@ -1736,13 +1736,17 @@ parse_endpoint(undefined) ->
1736
1736
parse_endpoint (Destination ) when is_binary (Destination ) ->
1737
1737
parse_endpoint (unicode :characters_to_list (Destination ));
1738
1738
parse_endpoint (Destination ) when is_list (Destination ) ->
1739
- case re :split (Destination , " /" , [{ return , list }] ) of
1739
+ case string :split (Destination , " /" , all ) of
1740
1740
[Name ] ->
1741
1741
{ok , {queue , unescape (Name )}};
1742
- [" " , Type | Rest ]
1743
- when Type =:= " exchange" orelse Type =:= " queue" orelse
1744
- Type =:= " topic" orelse Type =:= " temp-queue" ->
1745
- parse_endpoint0 (atomise (Type ), Rest );
1742
+ [" " , " exchange" | Rest ] ->
1743
+ parse_endpoint0 (exchange , Rest );
1744
+ [" " , " queue" | Rest ] ->
1745
+ parse_endpoint0 (queue , Rest );
1746
+ [" " , " topic" | Rest ] ->
1747
+ parse_endpoint0 (topic , Rest );
1748
+ [" " , " temp-queue" | Rest ] ->
1749
+ parse_endpoint0 (temp_queue , Rest );
1746
1750
[" " , " amq" , " queue" | Rest ] ->
1747
1751
parse_endpoint0 (amqqueue , Rest );
1748
1752
[" " , " reply-queue" = Prefix | [_ |_ ]] ->
@@ -1869,9 +1873,6 @@ new_amqqueue(QNameBin0, Type, Params0, _State = #proc_state{user = #user{usernam
1869
1873
to_url ([]) -> [];
1870
1874
to_url (Lol ) -> " /" ++ string :join (Lol , " /" ).
1871
1875
1872
- atomise (Name ) when is_list (Name ) ->
1873
- list_to_atom (re :replace (Name , " -" , " _" , [{return ,list }, global ])).
1874
-
1875
1876
unescape (Str ) -> unescape (Str , []).
1876
1877
1877
1878
unescape (" %2F" ++ Str , Acc ) -> unescape (Str , [$/ | Acc ]);
0 commit comments