-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Description
url.parse and URL (it just throws) don't handle urls with multiple hosts
var u = url.parse('mongodb://server1.db.foo.net:27017,server2.db.foo.net:27017,server3.db.foo.net:27017/data?authMechanism=MONGO-X509&replicaSet=rs0&ssl=true&sslValidate=true', true)
/*
Url {
protocol: 'https:',
slashes: true,
auth: 'foo',
host: 'server1.foo.net:7998',
port: '7998',
hostname: 'server1.foo.net',
hash: null,
search:
'?authMechanism=X509&replicaSet=rs0&ssl=true&sslValidate=true',
query:
{ authMechanism: 'X509',
replicaSet: 'rs0',
ssl: 'true',
sslValidate: 'true' },
pathname: '/:7998,server2.foo.net:7998,server3.foo.net/data',
path:
'/:7998,server2.foo.net:7998,server3.foo.net/data?authMechanism=X509&replicaSet=rs0&ssl=true&sslValidate=true',
// ...
*/python can handle them: whatwg/url#398 (comment)
So I wonder if it couldn't be something we can change in node?
danihodovic
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.