aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/fetch
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/fetch')
-rw-r--r--components/net/fetch/methods.rs16
1 files changed, 2 insertions, 14 deletions
diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs
index 553c92cf79d..49fd0563297 100644
--- a/components/net/fetch/methods.rs
+++ b/components/net/fetch/methods.rs
@@ -163,15 +163,8 @@ pub fn main_fetch(request: &mut Request,
// TODO: handle FTP URLs.
// Step 10.
- if !request.current_url().is_secure_scheme() && request.current_url().domain().is_some() {
- if context.state
- .hsts_list
- .read()
- .unwrap()
- .is_host_secure(request.current_url().domain().unwrap()) {
- request.url_list.last_mut().unwrap().as_mut_url().set_scheme("https").unwrap();
- }
- }
+ context.state.hsts_list.read().unwrap().switch_known_hsts_host_domain_url_to_https(
+ request.current_url_mut());
// Step 11.
// Not applicable: see fetch_async.
@@ -497,11 +490,6 @@ pub fn is_simple_method(m: &Method) -> bool {
}
}
-// fn modify_request_headers(headers: &mut Headers) -> {
-// // TODO this function
-
-// }
-
fn is_null_body_status(status: &Option<StatusCode>) -> bool {
match *status {
Some(status) => match status {