STOMP: Handle OTP28 re:split("", ...) behaviour

This commit is contained in:
Michal Kuratczyk 2025-06-24 23:25:50 +02:00
parent 79e3a946cc
commit 8273c500c4
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ parse_endpoint(Destination, AllowAnonymousQueue)
parse_endpoint(Destination, AllowAnonymousQueue)
when is_list(Destination) ->
case re:split(Destination, "/", [unicode, {return, list}]) of
[Name] ->
[] -> %% in OTP28+, re:split("", "/") returns []
{ok, {queue, unescape("")}};
[Name] -> %% before OTP28, re:split("", "/") returns [[]]
{ok, {queue, unescape(Name)}};
["", Type | Rest]
when Type =:= "exchange" orelse Type =:= "queue" orelse