Skip to content

URL: Don't accept port numbers for file urls #10608

@jasnell

Description

@jasnell

Per: whatwg/url#97

Given the test case:

var m = new url.URL('file:///example/foo');
m.host = 'example.net:81';

The resulting URL is:

URL {
  href: file://example.net:81/example/foo
  protocol: file:
  hostname: example.net
  port: 81
  pathname: /example/foo
}

The host setter needs to take into consideration the fact that this is a file URL. PR incoming shortly.

Metadata

Metadata

Assignees

Labels

whatwg-urlIssues and PRs related to the WHATWG URL implementation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions