mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
auto merge of #2166 : campadrenalin/servo/https-dont-panic, r=jdm
This is a stab at #2401 - I think this was what @jdm had in mind for a fix. I've also included a test. There's no "i tried" star, I'm too much of a newb for that, but hopefully the test at least confirms that servo doesn't crash on HTTPS requests.
This commit is contained in:
commit
7d9fa35671
2 changed files with 12 additions and 1 deletions
|
@ -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());
|
||||
|
||||
|
|
7
src/test/html/https.html
Normal file
7
src/test/html/https.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<img src="https://some-site.org/some-image.png"/>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue