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 @@ -1139,11 +1139,7 @@ impl<'a> Parser<'a> {
1139
1139
".." | "%2e%2e" | "%2e%2E" | "%2E%2e" | "%2E%2E" | "%2e." | "%2E." | ".%2e"
1140
1140
| ".%2E" => {
1141
1141
debug_assert ! ( self . serialization. as_bytes( ) [ segment_start - 1 ] == b'/' ) ;
1142
- if ends_with_slash {
1143
- self . serialization . truncate ( segment_start - 1 ) ; // Truncate "/../"
1144
- } else {
1145
- self . serialization . truncate ( segment_start) ; // Truncate ".."
1146
- }
1142
+ self . serialization . truncate ( segment_start - 1 ) ; // Truncate "/.."
1147
1143
self . pop_path ( scheme_type, path_start) ;
1148
1144
// 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.
1149
1145
if ends_with_slash && !self . serialization . ends_with ( "/" ) {
You can’t perform that action at this time.
0 commit comments