Skip to content

protocol setter changing between special and non-special schemes #104

Closed
@SimonSapin

Description

@SimonSapin

In https://url.spec.whatwg.org/#scheme-start-state

If state override is given, run these subsubsteps:

  • If url’s scheme is a special scheme and buffer is not, terminate this algorithm.
  • If url’s scheme is not a special scheme and buffer is, terminate this algorithm.

I think this is a remnant from before b266a43 (before URLs with unknown/non-special schemes could be relative) and is now more strict than necessary. I suggest changing it to:

If state override is given, url’s non-relative flag is set, and buffer is a special scheme, terminate this algorithm.

In other words, the only relevant invariant left to maintain is that an URL can not be both special and non-relative.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions