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

Normalize port after updating scheme #328

Merged
merged 2 commits into from
Jun 30, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions url.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,9 @@ string <var>input</var>, optionally with a <a>base URL</a> <var>base</var>, opti

<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.
Copy link
Member

@rmisev rmisev Jun 28, 2017

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
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
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.


<li><p>Set <var>buffer</var> to the empty string.

<li><p>If <var>state override</var> is given, then return.
Expand Down