Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite createClient. Fixes #651 #786

Merged
merged 1 commit into from
Jul 22, 2015
Merged

Rewrite createClient. Fixes #651 #786

merged 1 commit into from
Jul 22, 2015

Conversation

BridgeAR
Copy link
Contributor

I'd like to add some tests for it but the test suite right now is not really suitable as I see it. So this should probably wait until the mocha tests got merged as planned.

var parsed = URL.parse(arg0, true, true),
options = (arg1 || {});

var parsed = URL.parse(arg0, true, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like URL.parse does not return a parsed.port when the string is only a string number like "6379", so this introduces breaking changes. Am I wrong?

erin@elisheva:~/node_redis$ node  -e "var URL = require('url'); console.log(URL.parse('8000'));"
{ protocol: null,
  slashes: null,
  auth: null,
  host: null,
  port: null,
  hostname: null,
  hash: null,
  search: null,
  query: null,
  pathname: '8000',
  path: '8000',
  href: '8000' }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test every possibility and would like to add some before this is merged but I'm quite certain the behavior is just the same as it was before. There should not be any BC.

This code is the same as it was before in line 1245.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh, you're right. Looks like this bug predates your PR. Also, all of the new mocha tests (which test all applicable combinations of ipv4, ipv6, hiredis, javascript, and unix sockets) pass against this.

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