aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Gibson <sam@ifdown.net>2015-07-19 14:34:01 +1000
committerSam Gibson <sam@ifdown.net>2015-07-22 11:49:09 +1200
commit5014da42fc726b68b62d7864806ec12fd06c5d5f (patch)
tree9482f3c6a4caa6133d143aa4eb0d232c76f1cf9e
parentbae979137ad54c4c4b50dfce7771401285456053 (diff)
downloadservo-5014da42fc726b68b62d7864806ec12fd06c5d5f.tar.gz
servo-5014da42fc726b68b62d7864806ec12fd06c5d5f.zip
Only secure URL's that aren't already to HTTPS.
Cuts down on logger spam, and unnecessary Url::clone's
-rw-r--r--components/net/http_loader.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs
index 4c417bcad3a..bfb4dbfb94a 100644
--- a/components/net/http_loader.rs
+++ b/components/net/http_loader.rs
@@ -118,7 +118,7 @@ fn load(mut load_data: LoadData,
loop {
iters = iters + 1;
- if request_must_be_secured(&hsts_list.lock().unwrap(), &url) {
+ if &*url.scheme != "https" && request_must_be_secured(&hsts_list.lock().unwrap(), &url) {
info!("{} is in the strict transport security list, requesting secure host", url);
url = secure_url(&url);
}