Merge pull request #3148 from glennw/ssl

Add https support
This commit is contained in:
glennw 2014-08-26 14:26:33 +10:00
commit e85fcb6e9e
7 changed files with 18 additions and 6 deletions

3
.gitmodules vendored
View file

@ -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

4
configure vendored
View file

@ -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"
;;

View file

@ -103,6 +103,7 @@ DEPS_rust-url += \
DEPS_rust-http += \
rust-encoding \
rust-url \
rust-openssl \
$(NULL)
DEPS_string-cache += \

View file

@ -50,10 +50,13 @@ fn load(load_data: LoadData, start_chan: Sender<LoadResponse>) {
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());

View file

@ -214,7 +214,7 @@ impl ResourceManager {
fn load(&self, mut load_data: LoadData, start_chan: Sender<LoadResponse>) {
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() {

@ -1 +1 @@
Subproject commit 5c2bf7ad9e0893755800ae0ee25b196a43df529b
Subproject commit d0d2cbe0506b45941cb560d6fdab13e4c0d63d5d

@ -0,0 +1 @@
Subproject commit 05bc3cbc68bf097debbf109cf36374e313b15f94