Skip to content

url: update the processing in the scheme state.

Fix https://github.com/nodejs/node/issues/11785. I've updated the processing in the scheme state to follow the specification and synchronized url-setter-tests with upstream.

While I was testing added tests, I noticed that the current state machine of Node.js doesn't parse URL correctly for pathname. For example:

var url = new URL('ssh://example.net')
url.pathname
// expected: //example.net
// actual: '/'

So I got rid of the following test for this time.

{
  "href": "ssh://example.net",
  "new_value": "file",
  "expected": {
    "href": "ssh://example.net",
    "protocol": "ssh:"
  }
},

I will work on it later.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests are included
  • commit message follows [commit guidelines][]
Affected core subsystem(s)

url, test

Merge request reports

Loading