From 6740b29ffdf6463f384766174784bd204228e031 Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Thu, 13 Apr 2017 16:49:20 -0400 Subject: [PATCH 1/2] Spec update: IPv4 in IPv6 cleanup This does not change behavior but keeps us up to date with the spec. Follows https://github.com/whatwg/url/pull/292. --- src/url-state-machine.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/url-state-machine.js b/src/url-state-machine.js index a471d8a..96e77f1 100644 --- a/src/url-state-machine.js +++ b/src/url-state-machine.js @@ -305,10 +305,10 @@ function parseIPv6(input) { } else { ipv4Piece = ipv4Piece * 10 + number; } - ++pointer; if (ipv4Piece > 255) { return failure; } + ++pointer; } ip[piecePtr] = ip[piecePtr] * 0x100 + ipv4Piece; @@ -318,10 +318,10 @@ function parseIPv6(input) { if (numbersSeen === 2 || numbersSeen === 4) { ++piecePtr; } + } - if (input[pointer] === undefined && numbersSeen !== 4) { - return failure; - } + if (numbersSeen !== 4) { + return failure; } break; From 7f2645ef64c20d9b39834effc47a5581bee3a252 Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Fri, 14 Apr 2017 09:40:09 +0200 Subject: [PATCH 2/2] Update the README's spece commit hash --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b83fd15..916bd1f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ whatwg-url is a full implementation of the WHATWG [URL Standard](https://url.spe ## Current Status -whatwg-url is currently up to date with the URL spec up to commit [703fcd](https://github.com/whatwg/url/commit/703fcd0b92053345582a36b2e4a642ab65df076e). +whatwg-url is currently up to date with the URL spec up to commit [488c45](https://github.com/whatwg/url/commit/488c459d9e4245a3f6bf087e7dcd2c7e91487ac5). ## API