Use hosts-replaced URL only when loading resources

This commit is contained in:
James Graham 2015-06-18 13:51:59 +01:00
parent 56a9eab2a0
commit f52276d2cc
15 changed files with 162 additions and 132 deletions

View file

@ -930,6 +930,8 @@ dependencies = [
"log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"png 0.1.0 (git+https://github.com/servo/rust-png)",
"regex 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
"regex_macros 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)",

View file

@ -23,6 +23,7 @@ extern crate servo;
extern crate compositing;
// Servo networking
extern crate net;
extern crate net_traits;
// Servo common utilitiess
extern crate util;
// The window backed by glutin
@ -36,7 +37,7 @@ extern crate android_glue;
use std::rc::Rc;
use util::opts;
use net::resource_task;
use net_traits::hosts;
use servo::Browser;
use compositing::windowing::WindowEvent;
@ -52,7 +53,7 @@ fn main() {
setup_logging();
// Possibly interpret the `HOST_FILE` environment variable
resource_task::global_init();
hosts::global_init();
let window = if opts::get().headless {
None