Skip to content

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

Closed
thefourtheye wants to merge 1 commit into
nodejs:masterfrom
thefourtheye:http-fix-invalid-urls
Closed

thefourtheye wants to merge 1 commit into
nodejs:masterfrom
thefourtheye:http-fix-invalid-urls

Conversation

@thefourtheye

Copy link
Copy Markdown
Contributor

If the URL passed to http.request 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.

Previous Discussion: #2966

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

http Issues and PRs related to the http subsystem. https Issues and PRs related to the https subsystem. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.