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

lib: remove : from protocol in Url.parse(). #1237

Closed
wants to merge 1 commit into from
Closed

Conversation

anio
Copy link

@anio anio commented Mar 22, 2015

I only removed : from parsed protocol.

@Fishrock123
Copy link
Contributor

What is the purpose of this?

@mscdex
Copy link
Contributor

mscdex commented Mar 22, 2015

If there is always a : at the end, you could avoid the regexp with lowerProto.slice(0, -1)

@Fishrock123 Fishrock123 added the url Issues and PRs related to the legacy built-in url module. label Mar 22, 2015
@mscdex mscdex added semver-major PRs that contain breaking changes and should be released in the next major version. url Issues and PRs related to the legacy built-in url module. and removed url Issues and PRs related to the legacy built-in url module. labels Mar 22, 2015
@bnoordhuis
Copy link
Member

I move we just close this. It breaks all code ever written against the url module, including the test suite, for no good reason.

@kenany
Copy link
Contributor

kenany commented Mar 22, 2015

Previously: nodejs/node-v0.x-archive#1580

Current behavior matches the browser:

(new URL('https://github.com/iojs/io.js/pull/1237')).protocol
// => 'https:'

@Fishrock123
Copy link
Contributor

Might as well keep it like the browser.

@anio
Copy link
Author

anio commented Mar 23, 2015

KenanY, bnoordhuis
OK, but is it correct? I refer you to RFC 3986

@Fishrock123
Copy link
Contributor

@aino please read nodejs/node-v0.x-archive#1580

@kenany
Copy link
Contributor

kenany commented Mar 23, 2015

@anio That describes the syntax of URLs and how they are constructed, not how to parse them. If anything, you'd have to "fix" this in the browsers first before here. Although, it's worth pointing out that the colon is part of the spec.

@anio
Copy link
Author

anio commented Mar 23, 2015

:) Thanks guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major PRs that contain breaking changes and should be released in the next major version. url Issues and PRs related to the legacy built-in url module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants