Re: [whatwg/url] Normalize port after updating scheme (#328)

rmisev requested changes on this pull request.



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

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

2. Set url ’s scheme to buffer
3. Set buffer to the empty string
4. 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.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/328#pullrequestreview-46930830

Received on Wednesday, 28 June 2017 18:57:01 UTC