diff --git a/url.bs b/url.bs index 44bfb8c4..2f475eb9 100644 --- a/url.bs +++ b/url.bs @@ -756,14 +756,14 @@ not equivalent and typically treated as distinct.
An IP address is an IPv4 address or an IPv6 address. -
An IPv4 address is a 32-bit unsigned integer that identifies a -network address. +
An IPv4 address is a 32-bit unsigned integer that +identifies a network address. [[RFC791]] -
An IPv6 address is a 128-bit unsigned integer that identifies a -network address. For the purposes of this standard it is represented as a list of eight -16-bit unsigned integers, also known as -IPv6 pieces. +
An IPv6 address is a 128-bit unsigned integer that +identifies a network address. This integer is composed of a list of 8 +16-bit unsigned integers, also known as an IPv6 address's +pieces. [[RFC4291]]
Support for <zone_id>
is
@@ -1217,7 +1217,8 @@ these steps. They return failure or a tuple of a number and a boole
actually doing that with the editors of this document first.
Let address be a new IPv6 address whose IPv6 pieces are all 0. +
Let address be a new IPv6 address whose pieces + are all 0.
Let pieceIndex be 0. @@ -1444,20 +1445,14 @@ actually doing that with the editors of this document first.
Let output be the empty string. -
Let compress be an index to the first IPv6 piece in the first longest - sequences of address's IPv6 pieces that are 0. - -
In 0:f:0:0:f:f:0:0
it would point to
- the second 0.
-
-
If there is no sequence of address's IPv6 pieces that are 0 that is - longer than 1, then set compress to null. +
Let compress be the result of + finding the IPv6 address compressed piece index given address.
Let ignore0 be false.
For each pieceIndex in the range 0 to 7, inclusive: +
For each pieceIndex of address's + pieces's indices:
If ignore0 is true and address[pieceIndex] is 0, then @@ -1469,8 +1464,8 @@ actually doing that with the editors of this document first.
If compress is pieceIndex, then:
Let separator be "::
" if pieceIndex is 0, and
- U+003A (:) otherwise.
+
Let separator be "::
" if pieceIndex is 0; otherwise
+ U+003A (:).
Append separator to output. @@ -1491,6 +1486,57 @@ A Recommendation for IPv6 Address Text Representation. [[RFC5952]] +
To find the IPv6 address compressed piece index given an IPv6 address +address: + +
Let longestIndex be null. + +
Let longestSize be 1. + +
Let foundIndex be null. + +
Let foundSize be 0. + +
For each pieceIndex of address's + pieces's indices: + +
If address's pieces[pieceIndex] is not 0: + +
If foundSize is greater than longestSize, then set + longestIndex to foundIndex and longestSize to + foundSize. + +
Otherwise: + +
If foundIndex is null, then set foundIndex to + pieceIndex. + +
Increment foundSize by 1. +
If foundSize is greater than longestSize, then return + foundIndex. + +
Return longestIndex. +
In 0:f:0:0:f:f:0:0
it would point to the second 0.
+
A URL's port is either -null or a 16-bit unsigned integer that identifies a networking port. It is initially null. +
A URL's port is either null or a +16-bit unsigned integer that identifies a networking port. It is initially null.
A URL's path @@ -1974,8 +2020,8 @@ followed by a path-absolute-URL string.
the empty string -
one or more ASCII digits representing a decimal number no greater than - 216 − 1. +
one or more ASCII digits representing a decimal number that is a + 16-bit unsigned integer.
A scheme-relative-URL string must be @@ -2577,7 +2623,7 @@ and then runs these steps: by buffer in radix-10 using ASCII digits for digits with values 0 through 9. -
If port is greater than 216 − 1, +
If port is not a 16-bit unsigned integer, port-out-of-range validation error, return failure.
Set url's port to null, if port is