This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It seems we could support a parsing mode for schemes that are not relative schemes, nor are special in some other way (think data, javascript), that better matches RFC 3986. http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Nov/0046.html http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Nov/0047.html
We should consider making the authority/host component optional here since we can require stricter parsing rules. (No need to allow for 3+ leading slashes.)
*** Bug 27411 has been marked as a duplicate of this bug. ***
Does anybody have any suggestions for additions to the current tests, or modifications to the existing tests, for this? https://github.com/w3c/web-platform-tests/blob/master/url/urltestdata.txt https://url.spec.whatwg.org/interop/urltest-results/
baz unknown:foo baz unknown:foo/bar baz unknown:/foo/bar baz unknown://foo/bar baz unknown:///foo/bar also prefix each test with "/", "../", "?", "#" also test schemes that should not be relative (data, javascript etc).
> baz unknown:foo > baz unknown:foo/bar > baz unknown:/foo/bar > baz unknown://foo/bar > baz unknown:///foo/bar FYI, the proposed reference implementation passes those tests, which I guess is another way of saying that I don't believe that these tests, as stated, test for relative handling of unknown URIs. > also test schemes that should not be relative (data, javascript etc). Does anybody have a proposal for an exhaustive list?
Well you have to put in some other pass condition for the tests when you know what the new behavior should be.
As a possible base: https://svn.apache.org/repos/asf/labs/webarch/trunk/uri/rev-2002/uri_test.pl From: https://svn.apache.org/repos/asf/labs/webarch/trunk/uri/test/index.html#uri_test.pl
https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Jun/0028.html has a plan. Supporting this should not be too hard I think. https://gist.github.com/annevk/a8c2e8f37446cb298986 has some of the tests proposed by Simon, for which I'm updating the harness to support them.
https://github.com/whatwg/url/commit/b266a43fc9df0e8607074bd4d336a517e2010009
https://github.com/w3c/web-platform-tests/pull/1909 for the tests and changes to the testing infrastructure.