Skip to content

[Port] Better error message for slash in hostname - #1584

Merged
jlord merged 2 commits into
3.0.0from
port-pr-1559
Nov 29, 2017
Merged

[Port] Better error message for slash in hostname#1584
jlord merged 2 commits into
3.0.0from
port-pr-1559

Conversation

@jlord

@jlord jlord commented Nov 29, 2017

Copy link
Copy Markdown
Contributor

This ports #1559 from the 2.2 branch to 3.0.

Notes:

  • There were changes between 2.2 and 3.0 in the test set up so it's not a direct transfer there.
  • I had to add the check && r.path.indexOf('::') === -1 to line 203 because without it both test URIs end up with the slash error because they each contain 3 items in their array after the split:
# mongodb://invalid::host:27017/db
path split [ '', '::host', 'db' ]
# mongodb://invalid/host:27017/db
path split [ '', 'host:27017', 'db' ]

I'm not quite sure why the tests passed without this in 2.2 cc @mbroadst for thoughts 💭

@jlord
jlord requested a review from mbroadst November 29, 2017 16:19
@jlord
jlord merged commit f4c1b56 into 3.0.0 Nov 29, 2017
@jlord
jlord deleted the port-pr-1559 branch November 29, 2017 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants