From 9dca13ddb744a34bf47b5974840d8c84fb532262 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 30 Jan 2017 20:03:04 -0800 Subject: [PATCH] Fix per review --- scripts/get-latest-platform-tests.js | 2 +- src/url-state-machine.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/get-latest-platform-tests.js b/scripts/get-latest-platform-tests.js index f43b2b4..e045632 100644 --- a/scripts/get-latest-platform-tests.js +++ b/scripts/get-latest-platform-tests.js @@ -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 = "825b63235d43b95a12b4a174e3f8243bd990e741"; +const commitHash = "4ea8eae2fd807ffd22e84f3c2f2ca12f798f8206"; 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`; diff --git a/src/url-state-machine.js b/src/url-state-machine.js index 295eff1..85bad9c 100644 --- a/src/url-state-machine.js +++ b/src/url-state-machine.js @@ -706,9 +706,10 @@ URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash( if (isSpecial(this.url) && (c === p("/") || c === p("\\"))) { if (c === p("\\")) { this.parseError = true; - } else if (c === p("/")) { - this.state = "authority"; } + this.state = "special authority ignore slashes"; + } else if (c === p("/")) { + this.state = "authority"; } else { this.url.username = this.base.username; this.url.password = this.base.password;