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

The remove_dot_segments() function returns a relative path for an absolute input path after removing dot-dot segments. #111

Closed
t3stme1x opened this issue Aug 14, 2023 · 1 comment

Comments

@t3stme1x
Copy link

The remove_dot_segments() function returns an empty-string path for an absolute input path after removing dot-dot segments if the number of dot-dot segments is greater than the deepest path level. This is not compatible with the algorithm suggested by RFC3986 section-5.2.4.

INPUT: '/a/b/c/../../../../'
EXPECTED OUTPUT: '/'
Got: ''

Code snippet to reproduce the issue:

from rfc3986.normalizers import remove_dot_segments
assert remove_dot_segments('/a/b/c/../../../../') == '/'
@t3stme1x t3stme1x changed the title The remove_dot_segments() functions returns a relative path for an absolute input path after removing dot-dot segments. The remove_dot_segments() function returns a relative path for an absolute input path after removing dot-dot segments. Aug 14, 2023
@t3stme1x
Copy link
Author

/

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

No branches or pull requests

1 participant