Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TimothyGu opened this issue May 17, 2021 · 0 comments
Closed
Labels
whatwg-url Issues and PRs related to the WHATWG URL implementation.

Comments

@TimothyGu
Copy link
Member

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;
}

@TimothyGu TimothyGu added the whatwg-url Issues and PRs related to the WHATWG URL implementation. label May 17, 2021
TimothyGu added a commit to TimothyGu/node that referenced this issue May 21, 2021
This aligns with an upstream spec change.

Fixes: nodejs#38710
danielleadams pushed a commit that referenced this issue May 31, 2021
This aligns with an upstream spec change.

PR-URL: #38742
Fixes: #38710
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant