diff --git a/url.bs b/url.bs index 127743cc..442dbe4e 100644 --- a/url.bs +++ b/url.bs @@ -655,17 +655,45 @@ runs these steps:
If asciiDomain contains a forbidden host code point, validation error, return failure. -
Let ipv4Host be the result of IPv4 parsing - asciiDomain. - -
If ipv4Host is an IPv4 address or failure, return - ipv4Host. +
If asciiDomain ends in a number, then return + the result of IPv4 parsing asciiDomain.
Return asciiDomain.
The ends in a number checker takes a string input and then runs these +steps: + +
Let parts be the result of strictly splitting input on + U+002E (.). + +
If the last item in parts is the empty string, then: + +
+ +Let last be the last item in parts. + +
If parsing last as an IPv4 number does not + return failure, then return true. + +
If last is non-empty and contains only ASCII digits, then return true. + +
This can happen if last starts with "0
" so the
+ IPv4 number parser tries to parse it as octal, but it is not a
+ valid octal number, as is the case with, for example, "09
".
+
+
Return false. +
The IPv4 parser takes a string input and then runs these steps: @@ -692,7 +720,8 @@ these steps: but if it somehow is this conditional makes sure we can keep going. --> -
If parts's size is greater than 4, then return input. +
If parts's size is greater than 4, validation error, + return failure.
Let numbers be an empty list. @@ -700,16 +729,10 @@ these steps:
For each part of parts:
If part is the empty string, then return input. - -
0..0x300
is a
- domain, not an IPv4 address.
-
Let result be the result of parsing part. -
If result is failure, then return input. +
If result is failure, validation error, return failure.
If result[1] is true, then set validationError to true. @@ -754,6 +777,8 @@ these steps:
The IPv4 number parser takes a string input and then runs these steps:
If input is the empty string, then return failure. +
Let validationError be false.
Let R be 10.