Skip to content

Commit

Permalink
Fix parsing domains with empty labels
Browse files Browse the repository at this point in the history
Closes #82.
  • Loading branch information
domenic committed Apr 24, 2017
1 parent 3ead227 commit c3d6257
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/get-latest-platform-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const request = require("request");
// 1. Go to https://github.com/w3c/web-platform-tests/tree/master/url
// 2. Press "y" on your keyboard to get a permalink
// 3. Copy the commit hash
const commitHash = "0444344a4ace9dba478899c92de5a1d6d561cc54";
const commitHash = "3afae94fd4c945486a165e141a7755aa2a4908a3";

const sourceURL = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/url/urltestdata.json`;
const setterSourceURL = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/url/setters_tests.json`;
Expand Down
3 changes: 3 additions & 0 deletions src/url-state-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ function parseIPv4(input) {

const numbers = [];
for (const part of parts) {
if (part === "") {
return input;
}
const n = parseIPv4Number(part);
if (n === failure) {
return input;
Expand Down

0 comments on commit c3d6257

Please sign in to comment.