mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Kill hsts::secure_url
This commit is contained in:
parent
d2dc425336
commit
170bcfc03e
2 changed files with 0 additions and 38 deletions
|
@ -10,7 +10,6 @@ use std::collections::HashMap;
|
|||
use std::net::{Ipv4Addr, Ipv6Addr};
|
||||
use std::str::from_utf8;
|
||||
use time;
|
||||
use url::Url;
|
||||
|
||||
#[derive(Clone, Deserialize, Serialize)]
|
||||
pub struct HstsEntry {
|
||||
|
@ -136,15 +135,3 @@ impl HstsList {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn secure_url(url: &Url) -> Url {
|
||||
if url.scheme() == "http" {
|
||||
let mut secure_url = url.clone();
|
||||
secure_url.set_scheme("https").unwrap();
|
||||
// .set_port(Some(443)) would set the port to None,
|
||||
// and should only be done when it was already None.
|
||||
secure_url
|
||||
} else {
|
||||
url.clone()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue