mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Include square brackets for IPv6 addresses in Document::domain.
The specification changed out from under us. It's unfortunately impossible to write a test for this right now.
This commit is contained in:
parent
821afa071e
commit
231208a522
1 changed files with 0 additions and 6 deletions
|
@ -1767,12 +1767,6 @@ impl DocumentMethods for Document {
|
|||
fn Domain(&self) -> DOMString {
|
||||
// TODO: This should use the effective script origin when it exists
|
||||
let origin = self.window.get_url();
|
||||
|
||||
if let Some(&Host::Ipv6(ipv6)) = origin.host() {
|
||||
// Omit square brackets for IPv6 addresses.
|
||||
return DOMString::from(ipv6.to_string());
|
||||
}
|
||||
|
||||
DOMString::from(origin.serialize_host().unwrap_or_else(|| "".to_owned()))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue