Skip to content

Normalize port after updating scheme - #328

Merged
domenic merged 2 commits into
whatwg:masterfrom
TimothyGu:scheme-port
Jun 30, 2017
Merged

domenic merged 2 commits into
whatwg:masterfrom
TimothyGu:scheme-port

Conversation

@TimothyGu

@TimothyGu TimothyGu commented Jun 27, 2017 •

Copy link
Copy Markdown
Member

@annevk annevk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domenic do you want to update whatwg-url and then I land this and the tests?

@domenic

domenic commented Jun 28, 2017

Copy link
Copy Markdown
Member

Can do.

@annevk

annevk commented Jun 28, 2017

Copy link
Copy Markdown
Member

It seems like we should also file a bug against Edge. @TimothyGu are you up for that or shall I do it?

Comment thread url.bs Outdated
<li><p>Set <var>url</var>'s <a for=url>scheme</a> to <var>buffer</var>.

<li><p>If <var>url</var>'s <a for=url>port</a> is <var>url</var>'s <a for=url>scheme</a>'s
<a>default port</a>, then set <var>url</var>'s <a for=url>port</a> to null.

@rmisev rmisev Jun 28, 2017 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step is required for the protocol setter only, so it's better to place it after "4. If state override is given":

  1. Set url ’s scheme to buffer
  2. Set buffer to the empty string
  3. If state override is given, then:
    1. If url ’s port is url’s scheme’s default port , then set url’s port to null.
    2. Return.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, I think I agree with this.

And while we're in the area, is there a reason resetting buffer (3) is necessary before returning from a state override (4)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rmisev It's sort of odd to see "Return" on its own line, which was why I refrained from this style initally, but that's fine with me.

@GPHemsley not particularly. Changed.

@TimothyGu

Copy link
Copy Markdown
Member Author

@annevk annevk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll let @domenic do the honors.

@domenic

domenic commented Jun 30, 2017

Copy link
Copy Markdown
Member

whatwg-url confirms spec and test change are in harmony and don't break anything else; merge time!

@domenic
domenic merged commit 0f53958 into whatwg:master Jun 30, 2017
domenic pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 30, 2017
@TimothyGu
TimothyGu deleted the scheme-port branch June 30, 2017 00:06
domenic added a commit to jsdom/whatwg-url that referenced this pull request Jun 30, 2017
TimothyGu added a commit to TimothyGu/node that referenced this pull request Jun 30, 2017
TimothyGu added a commit to nodejs/node that referenced this pull request Jul 5, 2017
PR-URL: #13997
Refs: whatwg/url#328
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
addaleax pushed a commit to nodejs/node that referenced this pull request Jul 11, 2017
PR-URL: #13997
Refs: whatwg/url#328
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
addaleax pushed a commit to nodejs/node that referenced this pull request Jul 18, 2017
PR-URL: #13997
Refs: whatwg/url#328
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Fishrock123 pushed a commit to nodejs/node that referenced this pull request Jul 19, 2017
PR-URL: #13997
Refs: whatwg/url#328
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
rmisev added a commit to upa-url/upa that referenced this pull request May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants