Skip to content

Commit 96e2c49

Browse files
committed
STOMP: Handle OTP28 re:split("", ...) behaviour
1 parent 6655bfe commit 96e2c49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deps/rabbit_common/src/rabbit_routing_parser.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ parse_endpoint(Destination, AllowAnonymousQueue)
2323
parse_endpoint(Destination, AllowAnonymousQueue)
2424
when is_list(Destination) ->
2525
case re:split(Destination, "/", [unicode, {return, list}]) of
26-
[Name] ->
26+
[] -> %% in OTP28+, re:split("", "/") returns []
27+
{ok, {queue, unescape("")}};
28+
[Name] -> %% before OTP28, re:split("", "/") returns [[]]
2729
{ok, {queue, unescape(Name)}};
2830
["", Type | Rest]
2931
when Type =:= "exchange" orelse Type =:= "queue" orelse

0 commit comments

Comments
 (0)