@@ -1778,13 +1778,17 @@ parse_endpoint(undefined) ->
17781778parse_endpoint (Destination ) when is_binary (Destination ) ->
17791779 parse_endpoint (unicode :characters_to_list (Destination ));
17801780parse_endpoint (Destination ) when is_list (Destination ) ->
1781- case re :split (Destination , " /" , [{ return , list }] ) of
1781+ case string :split (Destination , " /" , all ) of
17821782 [Name ] ->
17831783 {ok , {queue , unescape (Name )}};
1784- [" " , Type | Rest ]
1785- when Type =:= " exchange" orelse Type =:= " queue" orelse
1786- Type =:= " topic" orelse Type =:= " temp-queue" ->
1787- parse_endpoint0 (atomise (Type ), Rest );
1784+ [" " , " exchange" | Rest ] ->
1785+ parse_endpoint0 (exchange , Rest );
1786+ [" " , " queue" | Rest ] ->
1787+ parse_endpoint0 (queue , Rest );
1788+ [" " , " topic" | Rest ] ->
1789+ parse_endpoint0 (topic , Rest );
1790+ [" " , " temp-queue" | Rest ] ->
1791+ parse_endpoint0 (temp_queue , Rest );
17881792 [" " , " amq" , " queue" | Rest ] ->
17891793 parse_endpoint0 (amqqueue , Rest );
17901794 [" " , " reply-queue" = Prefix | [_ |_ ]] ->
@@ -1911,9 +1915,6 @@ new_amqqueue(QNameBin0, Type, Params0, _State = #proc_state{user = #user{usernam
19111915to_url ([]) -> [];
19121916to_url (Lol ) -> " /" ++ string :join (Lol , " /" ).
19131917
1914- atomise (Name ) when is_list (Name ) ->
1915- list_to_atom (re :replace (Name , " -" , " _" , [{return ,list }, global ])).
1916-
19171918unescape (Str ) -> unescape (Str , []).
19181919
19191920unescape (" %2F" ++ Str , Acc ) -> unescape (Str , [$/ | Acc ]);
0 commit comments