File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -1157,11 +1157,7 @@ impl<'a> Parser<'a> {
1157
1157
".." | "%2e%2e" | "%2e%2E" | "%2E%2e" | "%2E%2E" | "%2e." | "%2E." | ".%2e"
1158
1158
| ".%2E" => {
1159
1159
debug_assert ! ( self . serialization. as_bytes( ) [ segment_start - 1 ] == b'/' ) ;
1160
- if ends_with_slash {
1161
- self . serialization . truncate ( segment_start - 1 ) ; // Truncate "/../"
1162
- } else {
1163
- self . serialization . truncate ( segment_start) ; // Truncate ".."
1164
- }
1160
+ self . serialization . truncate ( segment_start - 1 ) ; // Truncate "/.."
1165
1161
self . pop_path ( scheme_type, path_start) ;
1166
1162
// and then if neither c is U+002F (/), nor url is special and c is U+005C (\), append the empty string to url’s path.
1167
1163
if ends_with_slash && !self . serialization . ends_with ( "/" ) {
You can’t perform that action at this time.
0 commit comments