Skip to content

URL does not match the web; does not allow changing protocol from about: #49319

@ljharb

Description

@ljharb

Version

20.5.1

Platform

Darwin NAME.local 20.6.0 Darwin Kernel Version 20.6.0: Sun Nov 6 23:17:00 PST 2022; root:xnu-7195.141.46~1/RELEASE_X86_64 x86_64

Subsystem

URL

What steps will reproduce the bug?

Run Object.assign(new URL('about:blank'), { protocol: 'http' }).protocol === 'http:' in the REPL.

How often does it reproduce? Is there a required condition?

Always.

What is the expected behavior? Why is that the expected behavior?

true. It's expected because every browser does it, and because it works fine if the initial URL is an http/https one.

What do you see instead?

false

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    whatwg-urlIssues and PRs related to the WHATWG URL implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions