Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include square brackets for IPv6 addresses in Document::domain. #10287

Merged
merged 1 commit into from Mar 31, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

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.
  • Loading branch information
Ms2ger committed Mar 30, 2016
commit 231208a5226efa82e26ef9a941ed5d2cc62e5474
@@ -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()))
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.