File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -226,8 +226,6 @@ fn parse_host_within_brackets_loop(
226
226
"" -> Ok ( Uri ( .. pieces , host : Some ( uri_string ) ) )
227
227
228
228
// A `]` marks the end of the host and the start of the port part.
229
- // A port must always be preceded by a `:`, otherwise this is an invalid
230
- // uri.
231
229
"]" <> rest if size == 0 -> parse_port ( rest , pieces )
232
230
"]" <> rest -> {
233
231
let host = codeunit_slice ( original , at_index : 0 , length : size + 1 )
@@ -268,8 +266,9 @@ fn parse_host_within_brackets_loop(
268
266
case is_valid_host_withing_brackets_char ( char ) {
269
267
True ->
270
268
parse_host_within_brackets_loop ( original , rest , pieces , size + 1 )
269
+
271
270
False ->
272
- parse_host_outside_of_brackets_loop ( original , rest , pieces , size + 1 )
271
+ parse_host_outside_of_brackets_loop ( original , original , pieces , 0 )
273
272
}
274
273
}
275
274
}
You can’t perform that action at this time.
0 commit comments