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

http{s}: fix connecting to localhost if URL is invalid #2967

Closed

Commits on Oct 6, 2015

  1. http{s}: don't connect to localhost on invalid URL

    If the URL passed to `http{s}.request` or `http{s}.get` is not properly
    parsable by `url.parse`, we fall back to use `localhost` and port 80.
    This creates confusing error messages like in this question
    http://stackoverflow.com/q/32675907/1903116.
    
    This patch throws an error message, if `url.parse` fails to parse the
    URL properly.
    
    Previous Discussion: nodejs#2966
    PR-URL: nodejs#2967
    thefourtheye committed Oct 6, 2015
    Configuration menu
    Copy the full SHA
    4897c28 View commit details
    Browse the repository at this point in the history