Re: [whatwg/url] Prevent the pathname setter from erasing the path of path-only URLs, … (#582)

@karwa commented on this pull request.



> @@ -2298,6 +2298,10 @@ these steps:
 
        <li><p>If <a>c</a> is not U+002F (/), then decrease <var>pointer</var> by 1.
       </ol>
+
+     <li><p>Otherwise, if <var>state override</var> is given and <var>url</var>'s
+      <a for=url>host</a> is null, <a for=list>append</a> the empty string to <var>url</var>'s
+      <a for=url>path</a>

Because non-special URLs with a host (e.g. `foo://somehost`) can have an empty string as a path. The issue is limited to path-only URLs.

-- 
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/582#discussion_r580305906

Received on Monday, 22 February 2021 14:47:22 UTC