aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Horger <campadrenalin@gmail.com>2014-04-18 10:01:42 -0700
committerPhilip Horger <campadrenalin@gmail.com>2014-04-18 11:32:46 -0700
commitc63ae6f11d11ccefbae7d0db8bc99feaa7bbd62a (patch)
tree3b15ad2cc25076c7db0af9a46dff322c6df0bccd
parent58efe0bf7586f175ac4323ab234e8f6ef53a6f7d (diff)
downloadservo-c63ae6f11d11ccefbae7d0db8bc99feaa7bbd62a.tar.gz
servo-c63ae6f11d11ccefbae7d0db8bc99feaa7bbd62a.zip
Don't panic on https #2104
-rw-r--r--src/components/net/http_loader.rs6
-rw-r--r--src/test/html/https.html7
2 files changed, 12 insertions, 1 deletions
diff --git a/src/components/net/http_loader.rs b/src/components/net/http_loader.rs
index 1bed5bf2e49..2b632a5d572 100644
--- a/src/components/net/http_loader.rs
+++ b/src/components/net/http_loader.rs
@@ -52,7 +52,11 @@ fn load(mut url: Url, start_chan: Sender<LoadResponse>) {
redirected_to.insert(url.clone());
- assert!("http" == url.scheme);
+ if "http" != url.scheme {
+ info!("{:s} request, but we don't support that scheme", url.scheme);
+ send_error(url, start_chan);
+ return;
+ }
info!("requesting {:s}", url.to_str());
diff --git a/src/test/html/https.html b/src/test/html/https.html
new file mode 100644
index 00000000000..c461f0c5e3d
--- /dev/null
+++ b/src/test/html/https.html
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+<img src="https://some-site.org/some-image.png"/>
+</body>
+</html>