Closed
Description
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/../../../../') == '/'
Metadata
Metadata
Assignees
Labels
No labels