Skip to content

Commit 98d64c5

Browse files
committed
Report more port state failures
Follows whatwg/url@cc8b776. Does not impact normal URL parsing, but instead only direct usage of the underlying URL record API.
1 parent 1415e8d commit 98d64c5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ whatwg-url is a full implementation of the WHATWG [URL Standard](https://url.spe
44

55
## Specification conformance
66

7-
whatwg-url is currently up to date with the URL spec up to commit [6c78200](https://github.com/whatwg/url/commit/6c782003a2d53b1feecd072d1006eb8f1d65fb2d).
7+
whatwg-url is currently up to date with the URL spec up to commit [05a5d83](https://github.com/whatwg/url/commit/05a5d834deba31622390ee05a3dcbc22496b7bb5).
88

99
For `file:` URLs, whose [origin is left unspecified](https://url.spec.whatwg.org/#concept-url-origin), whatwg-url chooses to use a new opaque origin (which serializes to `"null"`).
1010

lib/url-state-machine.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,9 +861,12 @@ URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) {
861861
}
862862
this.url.port = port === defaultPort(this.url.scheme) ? null : port;
863863
this.buffer = "";
864+
if (this.stateOverride) {
865+
return false;
866+
}
864867
}
865868
if (this.stateOverride) {
866-
return false;
869+
return failure;
867870
}
868871
this.state = "path start";
869872
--this.pointer;

0 commit comments

Comments
 (0)