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

Fix Issue #264: Handle a few dot segment normalization corner cases better #267

Conversation

JordanMilne
Copy link
Contributor

See Issue #264

There are a few normalization steps that URI parsers may perform,
one is dot segment normalization and another is percent encoding
normalization.

The spec isn't clear on what order you should apply them, but in
practice browsers seem to normalize percent encoding, then remove
dot segments.

That means that /foo/%2E%2E/bar == /bar

Also, /foo/..bar should not have the dot segment removed.

There are a few normalization steps that URI parsers may perform,
one is dot segment normalization and another is percent encoding
normalization.

The spec isn't clear on what order you should apply them, but in
practice browsers seem to normalize percent encoding, then remove
dot segments.

That means that `/foo/%2E%2E/bar` == `/bar`

Also, `/foo/..bar` should not have the dot segment removed.
rodneyrehm added a commit that referenced this pull request Dec 2, 2015
…lization

fix(normalizePath): handle dot segment normalization edge cases - closes #264
@rodneyrehm rodneyrehm merged commit 845dee7 into medialize:gh-pages Dec 2, 2015
rodneyrehm added a commit that referenced this pull request Dec 2, 2015
@rodneyrehm
Copy link
Member

Thank you!

(I had to cherry-pick your commit to master because I didn't see that the PR was targeting gh-pages)

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

Successfully merging this pull request may close these issues.

2 participants