LibURL: Don't return early parsing a URL with an empty input

We can't simply use the base URL as it may need to be modified in some
form. For example - for the included test, the fragment was previously
being included in the resulting URL.

This fixes 1 test on https://wpt.live/url/url-constructor.any.html
This commit is contained in:
Shannon Booth 2024-08-06 22:35:11 +12:00 committed by Tim Ledbetter
commit 1dc4959e91
Notes: github-actions[bot] 2024-08-06 22:09:23 +00:00
3 changed files with 21 additions and 2 deletions

View file

@ -34,6 +34,7 @@
{ input: 'h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg' },
{ input: ' \t', base: 'http://ladybird.org/foo/bar' },
{ input: '/c:/foo/bar', base: 'file:///c:/baz/qux' },
{ input: '', base: 'file:///test?test#test' },
];
for (url of urls) {