Per the change in https://github.com/whatwg/url/pull/497.
@@ -82,6 +82,9 @@ impl Host<String> {
}
let domain = percent_decode(input.as_bytes()).decode_utf8_lossy();
let domain = idna::domain_to_ascii(&domain)?;
+ if domain.is_empty() {
+ return Err(ParseError::EmptyHost);
+ }
if domain
.find(|c| {
matches!(
@@ -950,16 +950,6 @@
"port": ""
},
- {
- "href": "file://hi/x",
- "new_value": "",
- "expected": {
- "href": "file:///x",
- "host": "",
- "hostname": "",
- "port": ""
- }
- },
{
"href": "sc://test@test/",
"new_value": "",
@@ -1284,16 +1274,6 @@