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

bug: parseConnectionString #34

Closed
booo opened this issue Jun 7, 2011 · 3 comments
Closed

bug: parseConnectionString #34

booo opened this issue Jun 7, 2011 · 3 comments

Comments

@booo
Copy link
Contributor

booo commented Jun 7, 2011

The parseConnectionString function does not work for connection strings containing for example ? as char. This is because we use url.parse()

  parseConnectionString: function(str) {
    var result = url.parse(str);
    result.host = result.hostname;
    result.database = result.pathname ? result.pathname.slice(1) : null;
    var auth = (result.auth || ':').split(':');
    result.user = auth[0];
    result.password = auth[1];
    return result;
  }
@brianc
Copy link
Owner

brianc commented Jun 7, 2011

Could I get an example of a broken connection string? Perhaps a gist or pull request w/ a failing test? I think I know what you're saying but don't want to suggest a fix until I can see what connection string is causing you grief.

@booo
Copy link
Contributor Author

booo commented Jun 7, 2011

https://gist.github.com/1012501

But I think this is a problem in node and we filled an other ticket. Sorry for disturbing you.

Node ticket: nodejs/node-v0.x-archive#1163

@brianc
Copy link
Owner

brianc commented Jul 10, 2011

Closing issue as it's related to node

@brianc brianc closed this as completed Jul 10, 2011
brianc pushed a commit that referenced this issue Dec 20, 2019
brianc pushed a commit that referenced this issue Apr 28, 2020
Support more modes to set the host as a socket
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

No branches or pull requests

2 participants