Bug 1825531 [wpt PR 39283] - Resolve bare fragments with a colon against non-hierarch...
commitc0999f1cd8802260096df48a9d3e6127248f082a
authorFredrik Söderquist <fs@opera.com>
Thu, 13 Apr 2023 04:26:15 +0000 (13 04:26 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 14 Apr 2023 11:15:17 +0000 (14 11:15 +0000)
tree415f43b785a1bf4835bc63cd2313e3b47e870a70
parentf38f6a4e043e2427031998dff515cfe6971cc75b
Bug 1825531 [wpt PR 39283] - Resolve bare fragments with a colon against non-hierarchical URLs, a=testonly

Automatic update from web-platform-tests
Resolve bare fragments with a colon against non-hierarchical URLs

Resolving a bare fragment with a colon against a non-hierarchical URL
would caused resolution to fail. This in turn would mean that - for
example - a lookup of a resource would fail.

A bare fragment with a colon should be handled the same as one without.
Since a scheme cannot start with - or otherwise contain - a '#' the
IsValidScheme() check will fail. Handle a leading '#' in that case in
the same way as it is handled for an empty scheme (bare fragment without
colon).

Bug: 1220361
Change-Id: I92da53953244ec7e85dba097bc166f84b0b339ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4379879
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1125250}

--

wpt-commits: fbbf4896611ecef0facb642f453ce7cd9549a162
wpt-pr: 39283
testing/web-platform/tests/url/resources/urltestdata.json