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

Remove dot segments in uri path as per RFC 3986 6.2.2.3 #3697

Merged

Conversation

taylorfinnell
Copy link
Contributor

As per 3986 6.2.2 URI paths should be normalized. This adds part of the normalization process and handles relative paths (6.2.2.3). ie /example/.. would be /.

Another option would be to add a normalized_path method.

Let me know what you think :)

@taylorfinnell
Copy link
Contributor Author

Looks like this causes a couple failures in other places. Maybe I should not touch full_path. Any thoughts?

@asterite
Copy link
Member

I don't think the original URI from the given string should be changed. In any case, I'd add a normalize and normalize! methods to apply these changes. Ruby has these methods too, though they don't seem to do the same (in fact, I don't know what they do)

@taylorfinnell
Copy link
Contributor Author

@asterite I added the normalize method, I agree I think it is the better way!

@asterite
Copy link
Member

@taylorfinnell Thank you!

I think this addition is good. If others can review and approve this too, I'll merge it.

@taylorfinnell
Copy link
Contributor Author

Excellent! Let me know if there is anything I can do! Hoping this is merged for 0.2.2 :)

@asterite asterite added this to the 0.20.2 milestone Dec 23, 2016
@asterite asterite merged commit 25c4ae1 into crystal-lang:master Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants