aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/hsts.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-04-05 14:31:23 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-04-05 14:42:49 +0200
commit170bcfc03e18ffa3c504022f65c87e2189575020 (patch)
tree1317a063fe259b3c6f0706061e476b4c5ceff772 /components/net/hsts.rs
parentd2dc425336cab24f8995cd10fba4d4606e1c0b02 (diff)
downloadservo-170bcfc03e18ffa3c504022f65c87e2189575020.tar.gz
servo-170bcfc03e18ffa3c504022f65c87e2189575020.zip
Kill hsts::secure_url
Diffstat (limited to 'components/net/hsts.rs')
-rw-r--r--components/net/hsts.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/components/net/hsts.rs b/components/net/hsts.rs
index f540955b05a..2af1c01099e 100644
--- a/components/net/hsts.rs
+++ b/components/net/hsts.rs
@@ -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()
- }
-}