Browse Source

url: remove invalid file protocol check

'file' should have been 'file:' but since the WHATWG URL spec
suggests using an opaque origin (which is what was already being
used for file URLs), we'll just keep using that, making this merely
a cleanup.

PR-URL: https://github.com/nodejs/node/pull/11691
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v7.x
Brian White 8 years ago
committed by Italo A. Casas
parent
commit
c5874d1bd4
No known key found for this signature in database GPG Key ID: 23EFEFE93C4CFFFE
  1. 1
      lib/internal/url.js

1
lib/internal/url.js

@ -1043,7 +1043,6 @@ function originFor(url, base) {
case 'https:':
case 'ws:':
case 'wss:':
case 'file':
origin = new TupleOrigin(protocol.slice(0, -1),
url[context].host,
url[context].port,

Loading…
Cancel
Save