Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add https support #3148

Merged
merged 1 commit into from Aug 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 05bc3c