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

Exactly 2 forward slashes between the host+port & path is not normalizing to 1 forward slash #76

Closed
RyanBard opened this issue Nov 14, 2018 · 2 comments

Comments

@RyanBard
Copy link

You can see it by adding the following test cases:

t.is(normalizeUrl('http://sindresorhus.com:5000///foo'), 'http://sindresorhus.com:5000/foo'); // passes
t.is(normalizeUrl('http://sindresorhus.com///foo'), 'http://sindresorhus.com/foo'); // passes
t.is(normalizeUrl('http://sindresorhus.com:5000//foo'), 'http://sindresorhus.com:5000/foo'); // fails - http://sindresorhus.com:5000//foo
t.is(normalizeUrl('http://sindresorhus.com//foo'), 'http://sindresorhus.com/foo'); // fails - http://sindresorhus.com//foo
@joual
Copy link
Contributor

joual commented Dec 4, 2018

Hey @RyanBard, I stumbled onto the same issue you did. I pushed a fix at #78. Let me add your tests just to verify it fixes your issues as well.

@joual
Copy link
Contributor

joual commented Dec 4, 2018

Yep, added your tests and everything seems to pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants