```println(Url("<https://www.google.com/unicorns>"...
# ktor
p
Copy code
println(Url("<https://www.google.com/unicorns>").pathSegments)
Is it a bug that this returns a list of two strings, where the first is empty and the second one is unicorns? Imo this should only contain
unicorns
@e5l Do I understand correctly, that this is a bug in 2.0.1 and not in 2.0.0 that’s now fixed by https://github.com/ktorio/ktor/pull/2975 in main?
1
a
According to the test this behavior is expected.
g
What means line 330 in this test then? Looks a bit weird... Also l.361 matches this specific case.
a
I would say line 365
👍 1
I agree that empty path segments for trailing slashes looks strange
p
It's also unexpected and has caused a bug here (which was thankfully covered by a test 😅)
For some reason it’s tagged as 2.0.1 and I can’t change that
a
I’ve added an explanation for this behavior in a comment.
p
Thanks. Added more explanation why I think this is a bad idea