diff --git a/.gitmodules b/.gitmodules index 9e263462b864..b41827f5e4d9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -124,3 +124,6 @@ [submodule "src/support/url/rust-url"] path = src/support/url/rust-url url = https://github.com/servo/rust-url.git +[submodule "src/support/ssl/rust-openssl"] + path = src/support/ssl/rust-openssl + url = https://github.com/servo/rust-openssl.git diff --git a/configure b/configure index df75966170d4..624661ce5d2c 100755 --- a/configure +++ b/configure @@ -530,6 +530,7 @@ CFG_SUBMODULES="\ support/skia/skia \ support/spidermonkey/mozjs \ support/spidermonkey/rust-mozjs \ + support/ssl/rust-openssl \ support/stb-image/rust-stb-image \ support/png/libpng \ support/png/rust-png \ @@ -739,6 +740,9 @@ do support/phf/rust-phf) ENABLE_DEBUG="" ;; + support/ssl/rust-openssl) + ENABLE_DEBUG="" + ;; support/encoding/rust-encoding) CONFIGURE_SCRIPT="${CFG_SRC_DIR}src/support/encoding/configure" ;; diff --git a/mk/sub.mk b/mk/sub.mk index 60f998e88a1b..f0752a006b29 100644 --- a/mk/sub.mk +++ b/mk/sub.mk @@ -103,6 +103,7 @@ DEPS_rust-url += \ DEPS_rust-http += \ rust-encoding \ rust-url \ + rust-openssl \ $(NULL) DEPS_string-cache += \ diff --git a/src/components/net/http_loader.rs b/src/components/net/http_loader.rs index 372ff279d527..c7cb56d4231c 100644 --- a/src/components/net/http_loader.rs +++ b/src/components/net/http_loader.rs @@ -50,10 +50,13 @@ fn load(load_data: LoadData, start_chan: Sender) { redirected_to.insert(url.clone()); - if "http" != url.scheme.as_slice() { - let s = format!("{:s} request, but we don't support that scheme", url.scheme); - send_error(url, s, start_chan); - return; + match url.scheme.as_slice() { + "http" | "https" => {} + _ => { + let s = format!("{:s} request, but we don't support that scheme", url.scheme); + send_error(url, s, start_chan); + return; + } } info!("requesting {:s}", url.serialize()); diff --git a/src/components/net/resource_task.rs b/src/components/net/resource_task.rs index ae474223be6f..bdc1c3f23397 100644 --- a/src/components/net/resource_task.rs +++ b/src/components/net/resource_task.rs @@ -214,7 +214,7 @@ impl ResourceManager { fn load(&self, mut load_data: LoadData, start_chan: Sender) { let loader = match load_data.url.scheme.as_slice() { "file" => file_loader::factory(), - "http" => http_loader::factory(), + "http" | "https" => http_loader::factory(), "data" => data_loader::factory(), "about" => { match load_data.url.non_relative_scheme_data().unwrap() { diff --git a/src/support/http/rust-http b/src/support/http/rust-http index 5c2bf7ad9e08..d0d2cbe0506b 160000 --- a/src/support/http/rust-http +++ b/src/support/http/rust-http @@ -1 +1 @@ -Subproject commit 5c2bf7ad9e0893755800ae0ee25b196a43df529b +Subproject commit d0d2cbe0506b45941cb560d6fdab13e4c0d63d5d diff --git a/src/support/ssl/rust-openssl b/src/support/ssl/rust-openssl new file mode 160000 index 000000000000..05bc3cbc68bf --- /dev/null +++ b/src/support/ssl/rust-openssl @@ -0,0 +1 @@ +Subproject commit 05bc3cbc68bf097debbf109cf36374e313b15f94