Skip to content

Commit

Permalink
Add https support
Browse files Browse the repository at this point in the history
  • Loading branch information
gw3583 committed Aug 25, 2014
1 parent ce45280 commit 4ff9d59
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -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 changes: 4 additions & 0 deletions configure
Expand Up @@ -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 \
Expand Down Expand Up @@ -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"
;;
Expand Down
1 change: 1 addition & 0 deletions mk/sub.mk
Expand Up @@ -103,6 +103,7 @@ DEPS_rust-url += \
DEPS_rust-http += \
rust-encoding \
rust-url \
rust-openssl \
$(NULL)

DEPS_string-cache += \
Expand Down
11 changes: 7 additions & 4 deletions src/components/net/http_loader.rs
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/components/net/resource_task.rs
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion src/support/http/rust-http
Submodule rust-http updated 1 files
+3 −3 Makefile.servo.in
1 change: 1 addition & 0 deletions src/support/ssl/rust-openssl
Submodule rust-openssl added at 51225f

0 comments on commit 4ff9d59

Please sign in to comment.