This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27233 - Support relative URLs for unknown schemes
Summary: Support relative URLs for unknown schemes
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+urlspec
URL:
Whiteboard:
Keywords:
: 27411 (view as bug list)
Depends on: 25946
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-04 16:22 UTC by Anne
Modified: 2015-06-17 17:37 UTC (History)
6 users (show)

See Also:


Attachments

Description Anne 2014-11-04 16:22:53 UTC
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
Comment 1 Anne 2014-11-06 09:07:08 UTC
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.)
Comment 2 Anne 2014-11-24 09:24:16 UTC
*** Bug 27411 has been marked as a duplicate of this bug. ***
Comment 3 Sam Ruby 2014-11-30 16:25:03 UTC
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/
Comment 4 Simon Pieters 2014-12-01 09:36:16 UTC
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).
Comment 5 Sam Ruby 2014-12-04 20:55:57 UTC
> 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?
Comment 6 Simon Pieters 2014-12-05 09:30:32 UTC
Well you have to put in some other pass condition for the tests when you know what the new behavior should be.
Comment 8 Anne 2015-06-16 17:17:09 UTC
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.
Comment 10 Anne 2015-06-17 17:37:53 UTC
https://github.com/w3c/web-platform-tests/pull/1909 for the tests and changes to the testing infrastructure.