Skip to content

WHATWG URL spec change: Make hostname setter no-op if a port is given #38710

@TimothyGu

Description

@TimothyGu

See whatwg/url#604. We should align our "hostname state" accordingly:

node/src/node_url.cc

Lines 1765 to 1778 in 3b1a993

if (buffer.size() == 0) {
url->flags |= URL_FLAGS_FAILED;
return;
}
url->flags |= URL_FLAGS_HAS_HOST;
if (!ParseHost(buffer, &url->host, special)) {
url->flags |= URL_FLAGS_FAILED;
return;
}
buffer.clear();
state = kPort;
if (state_override == kHostname) {
return;
}

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