Joining with absolute URLs
Closed this issue · 2 comments
langri-sha commented
When joining two absolute URLs, the output string seems to be incorrect:
join('https://foobar.com/barbaz/', 'https://quux.com/norf') === 'https://foobar.com/barbaz/https://quux.com/norf'
I would expect fragments that are absolute URLs to replace everything that was previously provided (becomes the new base URL):
join('https://foobar.com/barbaz/', 'https://quux.com/norf') === 'https://quux.com/norf'
join('https://foobar.com/barbaz/', 'quuxnorf', '//waldo) === 'https://waldo'