Upgrade to rust-url 1.0 and hyper 0.9

This commit is contained in:
Simon Sapin 2016-04-21 00:18:37 +02:00
parent 305c283602
commit 7932ab6ac2
76 changed files with 524 additions and 888 deletions

View file

@ -97,4 +97,4 @@ rand = "0.3"
serde = "0.7" serde = "0.7"
serde_macros = "0.7" serde_macros = "0.7"
time = "0.1.17" time = "0.1.17"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -1932,7 +1932,7 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
let event_info = self.pipelines.get(&pipeline_id).and_then(|pipeline| { let event_info = self.pipelines.get(&pipeline_id).and_then(|pipeline| {
pipeline.parent_info.map(|(containing_pipeline_id, subpage_id)| { pipeline.parent_info.map(|(containing_pipeline_id, subpage_id)| {
(containing_pipeline_id, subpage_id, pipeline.url.serialize()) (containing_pipeline_id, subpage_id, pipeline.url.to_string())
}) })
}); });

View file

@ -24,7 +24,7 @@ path = "../plugins"
git = "https://github.com/servo/ipc-channel" git = "https://github.com/servo/ipc-channel"
[dependencies] [dependencies]
hyper = { version = "0.8", features = [ "serde-serialization" ] } hyper = { version = "0.9", features = [ "serde-serialization" ] }
serde = "0.7" serde = "0.7"
serde_json = "0.7" serde_json = "0.7"
serde_macros = "0.7" serde_macros = "0.7"

View file

@ -312,7 +312,7 @@ impl NetworkEventActor {
} }
pub fn add_request(&mut self, request: DevtoolsHttpRequest) { pub fn add_request(&mut self, request: DevtoolsHttpRequest) {
self.request.url = request.url.serialize(); self.request.url = request.url.as_str().to_owned();
self.request.method = request.method.clone(); self.request.method = request.method.clone();
self.request.headers = request.headers.clone(); self.request.headers = request.headers.clone();
self.request.body = request.body; self.request.body = request.body;

View file

@ -285,7 +285,7 @@ fn run_server(sender: Sender<DevtoolsControlMsg>,
let tab = TabActor { let tab = TabActor {
name: actors.new_name("tab"), name: actors.new_name("tab"),
title: String::from(title), title: String::from(title),
url: url.serialize(), url: url.into_string(),
console: console.name(), console: console.name(),
inspector: inspector.name(), inspector: inspector.name(),
timeline: timeline.name(), timeline: timeline.name(),

View file

@ -20,10 +20,10 @@ path = "../plugins"
[dependencies] [dependencies]
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
hyper = { version = "0.8", features = [ "serde-serialization" ] } hyper = { version = "0.9", features = [ "serde-serialization" ] }
time = "0.1" time = "0.1"
bitflags = "0.3" bitflags = "0.3"
serde = "0.7" serde = "0.7"
serde_macros = "0.7" serde_macros = "0.7"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -30,7 +30,7 @@ smallvec = "0.1"
string_cache = {version = "0.2.12", features = ["heap_size"]} string_cache = {version = "0.2.12", features = ["heap_size"]}
time = "0.1.12" time = "0.1.12"
unicode-script = { version = "0.1", features = ["harfbuzz"] } unicode-script = { version = "0.1", features = ["harfbuzz"] }
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}
[dependencies.plugins] [dependencies.plugins]
path = "../plugins" path = "../plugins"

View file

@ -79,4 +79,4 @@ string_cache = {version = "0.2.12", features = ["heap_size"]}
time = "0.1" time = "0.1"
unicode-bidi = "0.2" unicode-bidi = "0.2"
unicode-script = { version = "0.1", features = ["harfbuzz"] } unicode-script = { version = "0.1", features = ["harfbuzz"] }
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -1002,7 +1002,7 @@ impl LayoutThread {
let document = unsafe { ServoLayoutNode::new(&data.document) }; let document = unsafe { ServoLayoutNode::new(&data.document) };
let document = document.as_document().unwrap(); let document = document.as_document().unwrap();
debug!("layout: received layout request for: {}", self.url.borrow().serialize()); debug!("layout: received layout request for: {}", *self.url.borrow());
let mut rw_data = possibly_locked_rw_data.lock(); let mut rw_data = possibly_locked_rw_data.lock();
@ -1048,8 +1048,7 @@ impl LayoutThread {
Some(x) => x, Some(x) => x,
}; };
debug!("layout: received layout request for: {}", debug!("layout: received layout request for: {}", *self.url.borrow());
self.url.borrow().serialize());
if log_enabled!(log::LogLevel::Debug) { if log_enabled!(log::LogLevel::Debug) {
node.dump(); node.dump();
} }
@ -1463,7 +1462,7 @@ impl LayoutThread {
/// Returns profiling information which is passed to the time profiler. /// Returns profiling information which is passed to the time profiler.
fn profiler_metadata(&self) -> Option<TimerMetadata> { fn profiler_metadata(&self) -> Option<TimerMetadata> {
Some(TimerMetadata { Some(TimerMetadata {
url: self.url.borrow().serialize(), url: self.url.borrow().to_string(),
iframe: if self.is_iframe { iframe: if self.is_iframe {
TimerMetadataFrameType::IFrame TimerMetadataFrameType::IFrame
} else { } else {

View file

@ -35,4 +35,4 @@ git = "https://github.com/servo/webrender_traits"
[dependencies] [dependencies]
serde = "0.7" serde = "0.7"
serde_macros = "0.7" serde_macros = "0.7"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -30,8 +30,8 @@ cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]}
euclid = {version = "0.6.4", features = ["plugins"]} euclid = {version = "0.6.4", features = ["plugins"]}
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
hyper = { version = "0.8", features = [ "serde-serialization" ] } hyper = { version = "0.9", features = [ "serde-serialization" ] }
rustc-serialize = "0.3.4" rustc-serialize = "0.3.4"
serde = "0.7" serde = "0.7"
serde_macros = "0.7" serde_macros = "0.7"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -35,9 +35,10 @@ git = "https://github.com/servo/webrender_traits"
[dependencies] [dependencies]
cookie = "0.2" cookie = "0.2"
flate2 = "0.2.0" flate2 = "0.2.0"
hyper = { version = "0.8", features = [ "serde-serialization" ] } hyper = { version = "0.9", features = [ "serde-serialization" ] }
immeta = "0.3.1" immeta = "0.3.1"
log = "0.3.5" log = "0.3.5"
matches = "0.1"
mime = "0.2.0" mime = "0.2.0"
mime_guess = "1.6.0" mime_guess = "1.6.0"
openssl = "0.7.6" openssl = "0.7.6"
@ -45,9 +46,9 @@ rustc-serialize = "0.3"
threadpool = "1.0" threadpool = "1.0"
time = "0.1.17" time = "0.1.17"
unicase = "1.4.0" unicase = "1.4.0"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size", "rustc-serialize"]}
uuid = { version = "0.2", features = ["v4"] } uuid = { version = "0.2", features = ["v4"] }
websocket = "0.16.1" websocket = "0.17"
[target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies] [target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies]
tinyfiledialogs = {git = "https://github.com/jdm/tinyfiledialogs"} tinyfiledialogs = {git = "https://github.com/jdm/tinyfiledialogs"}

View file

@ -27,8 +27,7 @@ pub fn factory(mut load_data: LoadData,
classifier: Arc<MIMEClassifier>, classifier: Arc<MIMEClassifier>,
cancel_listener: CancellationListener) { cancel_listener: CancellationListener) {
let url = load_data.url.clone(); let url = load_data.url.clone();
let non_relative_scheme_data = url.non_relative_scheme_data().unwrap(); match url.path() {
match non_relative_scheme_data {
"blank" => { "blank" => {
let metadata = Metadata { let metadata = Metadata {
final_url: load_data.url, final_url: load_data.url,
@ -49,7 +48,7 @@ pub fn factory(mut load_data: LoadData,
} }
"crash" => panic!("Loading the about:crash URL."), "crash" => panic!("Loading the about:crash URL."),
"failure" | "not-found" => "failure" | "not-found" =>
url_from_non_relative_scheme(&mut load_data, &(non_relative_scheme_data.to_owned() + ".html")), url_from_non_relative_scheme(&mut load_data, &(url.path().to_owned() + ".html")),
"sslfail" => url_from_non_relative_scheme(&mut load_data, "badcert.html"), "sslfail" => url_from_non_relative_scheme(&mut load_data, "badcert.html"),
_ => { _ => {
send_error(load_data.url, NetworkError::Internal("Unknown about: URL.".to_owned()), start_chan); send_error(load_data.url, NetworkError::Internal("Unknown about: URL.".to_owned()), start_chan);

View file

@ -6,26 +6,21 @@ use file_loader;
use mime_classifier::MIMEClassifier; use mime_classifier::MIMEClassifier;
use net_traits::{LoadConsumer, LoadData, NetworkError}; use net_traits::{LoadConsumer, LoadData, NetworkError};
use resource_thread::{CancellationListener, send_error}; use resource_thread::{CancellationListener, send_error};
use std::path::Path;
use std::sync::Arc; use std::sync::Arc;
use url::Url; use url::Url;
use util::resource_files::resources_dir_path; use util::resource_files::resources_dir_path;
pub fn resolve_chrome_url(url: &Url) -> Result<Url, ()> { pub fn resolve_chrome_url(url: &Url) -> Result<Url, ()> {
assert_eq!(url.scheme, "chrome"); assert_eq!(url.scheme(), "chrome");
// Skip the initial // let resources = resources_dir_path();
let non_relative_scheme_data = &url.non_relative_scheme_data().unwrap()[2..]; let mut path = resources.clone();
let relative_path = Path::new(non_relative_scheme_data); for segment in url.path_segments().unwrap() {
path.push(segment)
}
// Don't allow chrome URLs access to files outside of the resources directory. // Don't allow chrome URLs access to files outside of the resources directory.
if non_relative_scheme_data.find("..").is_some() || if !(path.starts_with(resources) && path.exists()) {
relative_path.is_absolute() ||
relative_path.has_root() {
return Err(()); return Err(());
} }
let mut path = resources_dir_path();
path.push(non_relative_scheme_data);
assert!(path.exists());
return Ok(Url::from_file_path(&*path).unwrap()); return Ok(Url::from_file_path(&*path).unwrap());
} }

View file

@ -40,7 +40,7 @@ impl Cookie {
_ => (false, None) _ => (false, None)
}; };
let url_host = request.host().map_or("".to_owned(), |host| host.serialize()); let url_host = request.host_str().unwrap_or("").to_owned();
// Step 4 // Step 4
let mut domain = cookie.domain.clone().unwrap_or("".to_owned()); let mut domain = cookie.domain.clone().unwrap_or("".to_owned());
@ -68,9 +68,7 @@ impl Cookie {
// Step 7 // Step 7
let mut path = cookie.path.unwrap_or("".to_owned()); let mut path = cookie.path.unwrap_or("".to_owned());
if path.chars().next() != Some('/') { if path.chars().next() != Some('/') {
let url_path = request.serialize_path(); path = Cookie::default_path(request.path()).to_owned();
let url_path = url_path.as_ref().map(|path| &**path);
path = Cookie::default_path(url_path.unwrap_or("")).to_owned();
} }
cookie.path = Some(path); cookie.path = Some(path);
@ -147,26 +145,26 @@ impl Cookie {
// http://tools.ietf.org/html/rfc6265#section-5.4 step 1 // http://tools.ietf.org/html/rfc6265#section-5.4 step 1
pub fn appropriate_for_url(&self, url: &Url, source: CookieSource) -> bool { pub fn appropriate_for_url(&self, url: &Url, source: CookieSource) -> bool {
let domain = url.host().map(|host| host.serialize()); let domain = url.host_str();
if self.host_only { if self.host_only {
if self.cookie.domain != domain { if self.cookie.domain.as_ref().map(String::as_str) != domain {
return false; return false;
} }
} else { } else {
if let (Some(ref domain), &Some(ref cookie_domain)) = (domain, &self.cookie.domain) { if let (Some(domain), &Some(ref cookie_domain)) = (domain, &self.cookie.domain) {
if !Cookie::domain_match(domain, cookie_domain) { if !Cookie::domain_match(domain, cookie_domain) {
return false; return false;
} }
} }
} }
if let (Some(ref path), &Some(ref cookie_path)) = (url.serialize_path(), &self.cookie.path) { if let Some(ref cookie_path) = self.cookie.path {
if !Cookie::path_match(path, cookie_path) { if !Cookie::path_match(url.path(), cookie_path) {
return false; return false;
} }
} }
if self.cookie.secure && url.scheme != "https" { if self.cookie.secure && url.scheme() != "https" {
return false; return false;
} }
if self.cookie.httponly && source == CookieSource::NonHTTP { if self.cookie.httponly && source == CookieSource::NonHTTP {

View file

@ -10,9 +10,8 @@ use net_traits::{LoadData, Metadata, NetworkError};
use resource_thread::{CancellationListener, send_error, start_sending_sniffed_opt}; use resource_thread::{CancellationListener, send_error, start_sending_sniffed_opt};
use rustc_serialize::base64::FromBase64; use rustc_serialize::base64::FromBase64;
use std::sync::Arc; use std::sync::Arc;
use url::SchemeData;
use url::Url;
use url::percent_encoding::percent_decode; use url::percent_encoding::percent_decode;
use url::{Position, Url};
pub fn factory(load_data: LoadData, pub fn factory(load_data: LoadData,
senders: LoadConsumer, senders: LoadConsumer,
@ -33,58 +32,42 @@ pub enum DecodeError {
pub type DecodeData = (Mime, Vec<u8>); pub type DecodeData = (Mime, Vec<u8>);
pub fn decode(url: &Url) -> Result<DecodeData, DecodeError> { pub fn decode(url: &Url) -> Result<DecodeData, DecodeError> {
assert!(&*url.scheme == "data"); assert!(url.scheme() == "data");
// Split out content type and data. // Split out content type and data.
let mut scheme_data = match url.scheme_data { let parts: Vec<&str> = url[Position::BeforePath..Position::AfterQuery].splitn(2, ',').collect();
SchemeData::NonRelative(ref scheme_data) => scheme_data.clone(),
_ => panic!("Expected a non-relative scheme URL."),
};
match url.query {
Some(ref query) => {
scheme_data.push_str("?");
scheme_data.push_str(query);
},
None => ()
}
let parts: Vec<&str> = scheme_data.splitn(2, ',').collect();
if parts.len() != 2 { if parts.len() != 2 {
return Err(DecodeError::InvalidDataUri); return Err(DecodeError::InvalidDataUri);
} }
// ";base64" must come at the end of the content type, per RFC 2397. // ";base64" must come at the end of the content type, per RFC 2397.
// rust-http will fail to parse it because there's no =value part. // rust-http will fail to parse it because there's no =value part.
let mut is_base64 = false; let mut ct_str = parts[0];
let mut ct_str = parts[0].to_owned(); let is_base64 = ct_str.ends_with(";base64");
if ct_str.ends_with(";base64") { if is_base64 {
is_base64 = true; ct_str = &ct_str[..ct_str.len() - ";base64".len()];
let end_index = ct_str.len() - 7;
ct_str.truncate(end_index);
}
if ct_str.starts_with(";charset=") {
ct_str = format!("text/plain{}", ct_str);
} }
let ct_str = if ct_str.starts_with(";charset=") {
format!("text/plain{}", ct_str)
} else {
ct_str.to_owned()
};
// Parse the content type using rust-http. let content_type = ct_str.parse().unwrap_or_else(|_| {
// FIXME: this can go into an infinite loop! (rust-http #25) Mime(TopLevel::Text, SubLevel::Plain,
let mut content_type: Option<Mime> = ct_str.parse().ok(); vec![(Attr::Charset, Value::Ext("US-ASCII".to_owned()))])
if content_type == None { });
content_type = Some(Mime(TopLevel::Text, SubLevel::Plain,
vec!((Attr::Charset, Value::Ext("US-ASCII".to_owned())))));
}
let bytes = percent_decode(parts[1].as_bytes()); let mut bytes = percent_decode(parts[1].as_bytes()).collect::<Vec<_>>();
let bytes = if is_base64 { if is_base64 {
// FIXME(#2909): Its unclear what to do with non-alphabet characters, // FIXME(#2909): Its unclear what to do with non-alphabet characters,
// but Acid 3 apparently depends on spaces being ignored. // but Acid 3 apparently depends on spaces being ignored.
let bytes = bytes.into_iter().filter(|&b| b != ' ' as u8).collect::<Vec<u8>>(); bytes = bytes.into_iter().filter(|&b| b != ' ' as u8).collect::<Vec<u8>>();
match bytes.from_base64() { match bytes.from_base64() {
Err(..) => return Err(DecodeError::NonBase64DataUri), Err(..) => return Err(DecodeError::NonBase64DataUri),
Ok(data) => data, Ok(data) => bytes = data,
} }
} else { }
bytes Ok((content_type, bytes))
};
Ok((content_type.unwrap(), bytes))
} }
pub fn load(load_data: LoadData, pub fn load(load_data: LoadData,

View file

@ -26,8 +26,7 @@ use std::iter::FromIterator;
use std::rc::Rc; use std::rc::Rc;
use std::thread; use std::thread;
use unicase::UniCase; use unicase::UniCase;
use url::idna::domain_to_ascii; use url::{Origin as UrlOrigin, Url};
use url::{Origin as UrlOrigin, OpaqueOrigin, Url, UrlParser, whatwg_scheme_type_mapper};
use util::thread::spawn_named; use util::thread::spawn_named;
pub fn fetch_async(request: Request, listener: Box<AsyncFetchListener + Send>) { pub fn fetch_async(request: Request, listener: Box<AsyncFetchListener + Send>) {
@ -115,7 +114,7 @@ fn main_fetch(request: Rc<Request>, cors_flag: bool, recursive_flag: bool) -> Re
// Step 2 // Step 2
if request.local_urls_only { if request.local_urls_only {
match &*request.current_url().scheme { match request.current_url().scheme() {
"about" | "blob" | "data" | "filesystem" => (), // Ok, the URL is local. "about" | "blob" | "data" | "filesystem" => (), // Ok, the URL is local.
_ => response = Some(Response::network_error()) _ => response = Some(Response::network_error())
} }
@ -153,8 +152,8 @@ fn main_fetch(request: Rc<Request>, cors_flag: bool, recursive_flag: bool) -> Re
}; };
if (same_origin && !cors_flag ) || if (same_origin && !cors_flag ) ||
(current_url.scheme == "data" && request.same_origin_data.get()) || (current_url.scheme() == "data" && request.same_origin_data.get()) ||
current_url.scheme == "about" || current_url.scheme() == "about" ||
request.mode == RequestMode::Navigate { request.mode == RequestMode::Navigate {
basic_fetch(request.clone()) basic_fetch(request.clone())
@ -166,7 +165,7 @@ fn main_fetch(request: Rc<Request>, cors_flag: bool, recursive_flag: bool) -> Re
request.response_tainting.set(ResponseTainting::Opaque); request.response_tainting.set(ResponseTainting::Opaque);
basic_fetch(request.clone()) basic_fetch(request.clone())
} else if current_url.scheme != "http" && current_url.scheme != "https" { } else if !matches!(current_url.scheme(), "http" | "https") {
Response::network_error() Response::network_error()
} else if request.use_cors_preflight || } else if request.use_cors_preflight ||
@ -253,10 +252,7 @@ fn main_fetch(request: Rc<Request>, cors_flag: bool, recursive_flag: bool) -> Re
} }
// Step 17 // Step 17
if request.body.borrow().is_some() && match &*request.current_url().scheme { if request.body.borrow().is_some() && matches!(request.current_url().scheme(), "http" | "https") {
"http" | "https" => true,
_ => false }
{
// TODO queue a fetch task on request to process end-of-file // TODO queue a fetch task on request to process end-of-file
} }
@ -287,21 +283,15 @@ fn main_fetch(request: Rc<Request>, cors_flag: bool, recursive_flag: bool) -> Re
fn basic_fetch(request: Rc<Request>) -> Response { fn basic_fetch(request: Rc<Request>) -> Response {
let url = request.current_url(); let url = request.current_url();
let scheme = url.scheme.clone();
match &*scheme { match url.scheme() {
"about" => { "about" if url.path() == "blank" => {
match url.non_relative_scheme_data() {
Some(s) if &*s == "blank" => {
let mut response = Response::new(); let mut response = Response::new();
response.headers.set(ContentType(mime!(Text / Html; Charset = Utf8))); response.headers.set(ContentType(mime!(Text / Html; Charset = Utf8)));
*response.body.lock().unwrap() = ResponseBody::Done(vec![]); *response.body.lock().unwrap() = ResponseBody::Done(vec![]);
response response
}, },
_ => Response::network_error()
}
},
"http" | "https" => { "http" | "https" => {
http_fetch(request.clone(), BasicCORSCache::new(), false, false, false) http_fetch(request.clone(), BasicCORSCache::new(), false, false, false)
@ -535,7 +525,7 @@ fn http_redirect_fetch(request: Rc<Request>,
// Step 5 // Step 5
let response_url = response.actual_response().url.as_ref().unwrap(); let response_url = response.actual_response().url.as_ref().unwrap();
let location_url = UrlParser::new().base_url(response_url).parse(&*location); let location_url = response_url.join(&*location);
// Step 6 // Step 6
let location_url = match location_url { let location_url = match location_url {
@ -573,7 +563,7 @@ fn http_redirect_fetch(request: Rc<Request>,
// Step 12 // Step 12
if cors_flag && !same_origin { if cors_flag && !same_origin {
*request.origin.borrow_mut() = Origin::Origin(UrlOrigin::UID(OpaqueOrigin::new())); *request.origin.borrow_mut() = Origin::Origin(UrlOrigin::new_opaque());
} }
// Step 13 // Step 13
@ -632,7 +622,7 @@ fn http_network_or_cache_fetch(request: Rc<Request>,
Referer::NoReferer => Referer::NoReferer =>
http_request.headers.borrow_mut().set(RefererHeader("".to_owned())), http_request.headers.borrow_mut().set(RefererHeader("".to_owned())),
Referer::RefererUrl(ref http_request_referer) => Referer::RefererUrl(ref http_request_referer) =>
http_request.headers.borrow_mut().set(RefererHeader(http_request_referer.serialize())), http_request.headers.borrow_mut().set(RefererHeader(http_request_referer.to_string())),
Referer::Client => Referer::Client =>
// it should be impossible for referer to be anything else during fetching // it should be impossible for referer to be anything else during fetching
// https://fetch.spec.whatwg.org/#concept-request-referrer // https://fetch.spec.whatwg.org/#concept-request-referrer
@ -702,9 +692,9 @@ fn http_network_or_cache_fetch(request: Rc<Request>,
let current_url = http_request.current_url(); let current_url = http_request.current_url();
authorization_value = if includes_credentials(&current_url) { authorization_value = if has_credentials(&current_url) {
Some(Basic { Some(Basic {
username: current_url.username().unwrap_or("").to_owned(), username: current_url.username().to_owned(),
password: current_url.password().map(str::to_owned) password: current_url.password().map(str::to_owned)
}) })
} else { } else {
@ -1059,13 +1049,8 @@ fn cors_check(request: Rc<Request>, response: &Response) -> Result<(), ()> {
_ => return Err(()) _ => return Err(())
}; };
// strings are already utf-8 encoded, so there's no need to re-encode origin for this step match *request.origin.borrow() {
match ascii_serialise_origin(&request.origin.borrow()) { Origin::Origin(ref o) if o.ascii_serialization() == origin => {},
Ok(request_origin) => {
if request_origin != origin {
return Err(());
}
},
_ => return Err(()) _ => return Err(())
} }
@ -1086,39 +1071,6 @@ fn cors_check(request: Rc<Request>, response: &Response) -> Result<(), ()> {
Err(()) Err(())
} }
/// [ASCII serialisation of an origin](https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin)
fn ascii_serialise_origin(origin: &Origin) -> Result<String, ()> {
// Step 6
match *origin {
// Step 1
Origin::Origin(UrlOrigin::UID(_)) => Ok("null".to_owned()),
// Step 2
Origin::Origin(UrlOrigin::Tuple(ref scheme, ref host, ref port)) => {
// Step 3
// this step is handled by the format!()s later in the function
// Step 4
// TODO throw a SecurityError in a meaningful way
// let host = host.as_str();
let host = try!(domain_to_ascii(host.serialize().as_str()).or(Err(())));
// Step 5
let default_port = whatwg_scheme_type_mapper(scheme).default_port();
if Some(*port) == default_port {
Ok(format!("{}://{}", scheme, host))
} else {
Ok(format!("{}://{}{}", scheme, host, port))
}
}
_ => Err(())
}
}
fn global_user_agent() -> String { fn global_user_agent() -> String {
// TODO have a better useragent string // TODO have a better useragent string
const USER_AGENT_STRING: &'static str = "Servo"; const USER_AGENT_STRING: &'static str = "Servo";
@ -1126,7 +1078,7 @@ fn global_user_agent() -> String {
} }
fn has_credentials(url: &Url) -> bool { fn has_credentials(url: &Url) -> bool {
!url.username().unwrap_or("").is_empty() || url.password().is_some() !url.username().is_empty() || url.password().is_some()
} }
fn is_no_store_cache(headers: &Headers) -> bool { fn is_no_store_cache(headers: &Headers) -> bool {
@ -1156,19 +1108,6 @@ fn is_simple_method(m: &Method) -> bool {
} }
} }
fn includes_credentials(url: &Url) -> bool {
if url.password().is_some() {
return true
}
if let Some(name) = url.username() {
return name.len() > 0
}
false
}
fn response_needs_revalidation(_response: &Response) -> bool { fn response_needs_revalidation(_response: &Response) -> bool {
// TODO this function // TODO this function
false false

View file

@ -67,7 +67,7 @@ pub fn factory(load_data: LoadData,
senders: LoadConsumer, senders: LoadConsumer,
classifier: Arc<MIMEClassifier>, classifier: Arc<MIMEClassifier>,
cancel_listener: CancellationListener) { cancel_listener: CancellationListener) {
assert!(&*load_data.url.scheme == "file"); assert!(load_data.url.scheme() == "file");
spawn_named("file_loader".to_owned(), move || { spawn_named("file_loader".to_owned(), move || {
let file_path = match load_data.url.to_file_path() { let file_path = match load_data.url.to_file_path() {
Ok(file_path) => file_path, Ok(file_path) => file_path,

View file

@ -122,13 +122,11 @@ impl HstsList {
} }
pub fn secure_url(url: &Url) -> Url { pub fn secure_url(url: &Url) -> Url {
if &*url.scheme == "http" { if url.scheme() == "http" {
let mut secure_url = url.clone(); let mut secure_url = url.clone();
secure_url.scheme = "https".to_owned(); secure_url.set_scheme("https").unwrap();
secure_url.relative_scheme_data_mut() // .set_port(Some(443)) would set the port to None,
.map(|scheme_data| { // and should only be done when it was already None.
scheme_data.default_port = Some(443);
});
secure_url secure_url
} else { } else {
url.clone() url.clone()

View file

@ -43,7 +43,7 @@ use time;
use time::Tm; use time::Tm;
#[cfg(any(target_os = "macos", target_os = "linux"))] #[cfg(any(target_os = "macos", target_os = "linux"))]
use tinyfiledialogs; use tinyfiledialogs;
use url::Url; use url::{Url, Position};
use util::prefs; use util::prefs;
use util::resource_files::resources_dir_path; use util::resource_files::resources_dir_path;
use util::thread::spawn_named; use util::thread::spawn_named;
@ -89,7 +89,7 @@ pub fn factory(user_agent: String,
Arc<MIMEClassifier>, Arc<MIMEClassifier>,
CancellationListener) + Send> { CancellationListener) + Send> {
box move |load_data: LoadData, senders, classifier, cancel_listener| { box move |load_data: LoadData, senders, classifier, cancel_listener| {
spawn_named(format!("http_loader for {}", load_data.url.serialize()), move || { spawn_named(format!("http_loader for {}", load_data.url), move || {
load_for_consumer(load_data, load_for_consumer(load_data,
senders, senders,
classifier, classifier,
@ -120,11 +120,6 @@ pub fn read_block<R: Read>(reader: &mut R) -> Result<ReadResult, ()> {
} }
} }
fn inner_url(url: &Url) -> Url {
let inner_url = url.non_relative_scheme_data().unwrap();
Url::parse(inner_url).unwrap()
}
pub struct HttpState { pub struct HttpState {
pub hsts_list: Arc<RwLock<HstsList>>, pub hsts_list: Arc<RwLock<HstsList>>,
pub cookie_jar: Arc<RwLock<CookieStorage>>, pub cookie_jar: Arc<RwLock<CookieStorage>>,
@ -399,7 +394,7 @@ fn set_cookies_from_response(url: Url, response: &HttpResponse, cookie_jar: &Arc
} }
fn update_sts_list_from_response(url: &Url, response: &HttpResponse, hsts_list: &Arc<RwLock<HstsList>>) { fn update_sts_list_from_response(url: &Url, response: &HttpResponse, hsts_list: &Arc<RwLock<HstsList>>) {
if url.scheme != "https" { if url.scheme() != "https" {
return; return;
} }
@ -526,8 +521,8 @@ pub fn modify_request_headers(headers: &mut Headers,
load_data: &LoadData) { load_data: &LoadData) {
// Ensure that the host header is set from the original url // Ensure that the host header is set from the original url
let host = Host { let host = Host {
hostname: url.serialize_host().unwrap(), hostname: url.host_str().unwrap().to_owned(),
port: url.port_or_default() port: url.port_or_known_default()
}; };
headers.set(host); headers.set(host);
@ -576,14 +571,14 @@ fn auth_from_entry(auth_entry: &AuthCacheEntry, headers: &mut Headers) {
} }
fn auth_from_url(doc_url: &Url) -> Option<Authorization<Basic>> { fn auth_from_url(doc_url: &Url) -> Option<Authorization<Basic>> {
match doc_url.username() { let username = doc_url.username();
Some(username) if username != "" => { if username != "" {
Some(Authorization(Basic { Some(Authorization(Basic {
username: username.to_owned(), username: username.to_owned(),
password: Some(doc_url.password().unwrap_or("").to_owned()) password: Some(doc_url.password().unwrap_or("").to_owned())
})) }))
}, } else {
_ => None None
} }
} }
@ -739,16 +734,16 @@ pub fn load<A, B>(load_data: &LoadData,
// real URL that should be used for which the source is to be viewed. // real URL that should be used for which the source is to be viewed.
// Change our existing URL to that and keep note that we are viewing // Change our existing URL to that and keep note that we are viewing
// the source rather than rendering the contents of the URL. // the source rather than rendering the contents of the URL.
let viewing_source = doc_url.scheme == "view-source"; let viewing_source = doc_url.scheme() == "view-source";
if viewing_source { if viewing_source {
doc_url = inner_url(&load_data.url); doc_url = Url::parse(&load_data.url[Position::BeforeUsername..]).unwrap();
} }
// Loop to handle redirects. // Loop to handle redirects.
loop { loop {
iters = iters + 1; iters = iters + 1;
if &*doc_url.scheme == "http" && request_must_be_secured(&doc_url, &http_state.hsts_list) { if doc_url.scheme() == "http" && request_must_be_secured(&doc_url, &http_state.hsts_list) {
info!("{} is in the strict transport security list, requesting secure host", doc_url); info!("{} is in the strict transport security list, requesting secure host", doc_url);
doc_url = secure_url(&doc_url); doc_url = secure_url(&doc_url);
} }
@ -758,8 +753,8 @@ pub fn load<A, B>(load_data: &LoadData,
"too many redirects".to_owned())); "too many redirects".to_owned()));
} }
if &*doc_url.scheme != "http" && &*doc_url.scheme != "https" { if !matches!(doc_url.scheme(), "http" | "https") {
let s = format!("{} request, but we don't support that scheme", &*doc_url.scheme); let s = format!("{} request, but we don't support that scheme", doc_url.scheme());
return Err(LoadError::new(doc_url, LoadErrorType::UnsupportedScheme, s)); return Err(LoadError::new(doc_url, LoadErrorType::UnsupportedScheme, s));
} }
@ -767,7 +762,7 @@ pub fn load<A, B>(load_data: &LoadData,
return Err(LoadError::new(doc_url, LoadErrorType::Cancelled, "load cancelled".to_owned())); return Err(LoadError::new(doc_url, LoadErrorType::Cancelled, "load cancelled".to_owned()));
} }
info!("requesting {}", doc_url.serialize()); info!("requesting {}", doc_url);
// Avoid automatically preserving request headers when redirects occur. // Avoid automatically preserving request headers when redirects occur.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=401564 and // See https://bugzilla.mozilla.org/show_bug.cgi?id=401564 and
@ -877,7 +872,7 @@ pub fn load<A, B>(load_data: &LoadData,
}); });
metadata.headers = Some(adjusted_headers); metadata.headers = Some(adjusted_headers);
metadata.status = Some(response.status_raw().clone()); metadata.status = Some(response.status_raw().clone());
metadata.https_state = if doc_url.scheme == "https" { metadata.https_state = if doc_url.scheme() == "https" {
HttpsState::Modern HttpsState::Modern
} else { } else {
HttpsState::None HttpsState::None

View file

@ -18,8 +18,8 @@ extern crate flate2;
extern crate hyper; extern crate hyper;
extern crate immeta; extern crate immeta;
extern crate ipc_channel; extern crate ipc_channel;
#[macro_use] #[macro_use] extern crate log;
extern crate log; #[macro_use] extern crate matches;
#[macro_use] #[macro_use]
extern crate mime; extern crate mime;
extern crate mime_guess; extern crate mime_guess;

View file

@ -397,7 +397,7 @@ impl ResourceManager {
}); });
let cancel_listener = CancellationListener::new(cancel_resource); let cancel_listener = CancellationListener::new(cancel_resource);
let loader = match &*load_data.url.scheme { let loader = match load_data.url.scheme() {
"chrome" => from_factory(chrome_loader::factory), "chrome" => from_factory(chrome_loader::factory),
"file" => from_factory(file_loader::factory), "file" => from_factory(file_loader::factory),
"http" | "https" | "view-source" => { "http" | "https" | "view-source" => {
@ -414,12 +414,12 @@ impl ResourceManager {
"data" => from_factory(data_loader::factory), "data" => from_factory(data_loader::factory),
"about" => from_factory(about_loader::factory), "about" => from_factory(about_loader::factory),
_ => { _ => {
debug!("resource_thread: no loader for scheme {}", load_data.url.scheme); debug!("resource_thread: no loader for scheme {}", load_data.url.scheme());
send_error(load_data.url, NetworkError::Internal("no loader for scheme".to_owned()), consumer); send_error(load_data.url, NetworkError::Internal("no loader for scheme".to_owned()), consumer);
return return
} }
}; };
debug!("resource_thread: loading url: {}", load_data.url.serialize()); debug!("resource_thread: loading url: {}", load_data.url);
loader.call_box((load_data, loader.call_box((load_data,
consumer, consumer,

View file

@ -221,15 +221,6 @@ impl StorageManager {
} }
fn origin_as_string(&self, url: Url) -> String { fn origin_as_string(&self, url: Url) -> String {
let mut origin = "".to_owned(); url.origin().ascii_serialization()
origin.push_str(&url.scheme);
origin.push_str("://");
url.domain().map(|domain| origin.push_str(&domain));
url.port().map(|port| {
origin.push_str(":");
origin.push_str(&port.to_string());
});
origin.push_str("/");
origin
} }
} }

View file

@ -32,8 +32,8 @@ fn establish_a_websocket_connection(resource_url: &Url, net_url: (Host, String,
-> WebSocketResult<(Headers, Sender<WebSocketStream>, Receiver<WebSocketStream>)> { -> WebSocketResult<(Headers, Sender<WebSocketStream>, Receiver<WebSocketStream>)> {
let host = Host { let host = Host {
hostname: resource_url.serialize_host().unwrap(), hostname: resource_url.host_str().unwrap().to_owned(),
port: resource_url.port_or_default() port: resource_url.port_or_known_default(),
}; };
let mut request = try!(Client::connect(net_url)); let mut request = try!(Client::connect(net_url));

View file

@ -23,11 +23,11 @@ path = "../plugins"
[dependencies] [dependencies]
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
hyper = { version = "0.8", features = [ "serde-serialization" ] } hyper = { version = "0.9", features = [ "serde-serialization" ] }
image = "0.9" image = "0.9"
lazy_static = "0.1.15" lazy_static = "0.1.15"
log = "0.3.5" log = "0.3.5"
serde = "0.7" serde = "0.7"
serde_macros = "0.7" serde_macros = "0.7"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}
websocket = "0.16.1" websocket = "0.17"

View file

@ -8,14 +8,14 @@ use std::collections::HashMap;
use std::env; use std::env;
use std::fs::File; use std::fs::File;
use std::io::{BufReader, Read}; use std::io::{BufReader, Read};
use std::net::{Ipv4Addr, Ipv6Addr}; use std::net::IpAddr;
use url::Url; use url::Url;
lazy_static! { lazy_static! {
static ref HOST_TABLE: Option<HashMap<String, String>> = create_host_table(); static ref HOST_TABLE: Option<HashMap<String, IpAddr>> = create_host_table();
} }
fn create_host_table() -> Option<HashMap<String, String>> { fn create_host_table() -> Option<HashMap<String, IpAddr>> {
//TODO: handle bad file path //TODO: handle bad file path
let path = match env::var("HOST_FILE") { let path = match env::var("HOST_FILE") {
Ok(host_file_path) => host_file_path, Ok(host_file_path) => host_file_path,
@ -36,21 +36,18 @@ fn create_host_table() -> Option<HashMap<String, String>> {
return Some(parse_hostsfile(&lines)); return Some(parse_hostsfile(&lines));
} }
pub fn parse_hostsfile(hostsfile_content: &str) -> HashMap<String, String> { pub fn parse_hostsfile(hostsfile_content: &str) -> HashMap<String, IpAddr> {
let mut host_table = HashMap::new(); let mut host_table = HashMap::new();
for line in hostsfile_content.split('\n') { for line in hostsfile_content.split('\n') {
let ip_host: Vec<&str> = line.trim().split(|c: char| c == ' ' || c == '\t').collect(); let ip_host: Vec<&str> = line.trim().split(|c: char| c == ' ' || c == '\t').collect();
if ip_host.len() > 1 { if ip_host.len() > 1 {
if ip_host[0].parse::<Ipv4Addr>().is_err() && ip_host[0].parse::<Ipv6Addr>().is_err() { if let Ok(address) = ip_host[0].parse::<IpAddr>() {
continue
}
let address = ip_host[0].to_owned();
for token in ip_host.iter().skip(1) { for token in ip_host.iter().skip(1) {
if token.as_bytes()[0] == b'#' { if token.as_bytes()[0] == b'#' {
break; break;
} }
host_table.insert((*token).to_owned(), address.clone()); host_table.insert((*token).to_owned(), address);
}
} }
} }
} }
@ -63,12 +60,11 @@ pub fn replace_hosts(url: &Url) -> Url {
}) })
} }
pub fn host_replacement(host_table: &HashMap<String, String>, pub fn host_replacement(host_table: &HashMap<String, IpAddr>,
url: &Url) -> Url { url: &Url) -> Url {
url.domain().and_then(|domain| url.domain().and_then(|domain| host_table.get(domain).map(|ip| {
host_table.get(domain).map(|ip| { let mut new_url = url.clone();
let mut net_url = url.clone(); new_url.set_ip_host(*ip).unwrap();
*net_url.domain_mut().unwrap() = ip.clone(); new_url
net_url })).unwrap_or_else(|| url.clone())
})).unwrap_or(url.clone())
} }

View file

@ -241,7 +241,7 @@ impl Request {
} }
pub fn current_url_string(&self) -> String { pub fn current_url_string(&self) -> String {
self.url_list.borrow().last().unwrap().serialize() self.url_list.borrow().last().unwrap().to_string()
} }
pub fn is_navigation_request(&self) -> bool { pub fn is_navigation_request(&self) -> bool {

View file

@ -74,7 +74,7 @@ fnv = "1.0"
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
html5ever = {version = "0.5.1", features = ["heap_size", "unstable"]} html5ever = {version = "0.5.1", features = ["heap_size", "unstable"]}
hyper = { version = "0.8", features = [ "serde-serialization" ] } hyper = { version = "0.9", features = [ "serde-serialization" ] }
image = "0.9" image = "0.9"
libc = "0.2" libc = "0.2"
log = "0.3.5" log = "0.3.5"
@ -94,6 +94,6 @@ smallvec = "0.1"
string_cache = {version = "0.2.12", features = ["heap_size", "unstable"]} string_cache = {version = "0.2.12", features = ["heap_size", "unstable"]}
time = "0.1.12" time = "0.1.12"
unicase = "1.0" unicase = "1.0"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}
uuid = { version = "0.2", features = ["v4"] } uuid = { version = "0.2", features = ["v4"] }
websocket = "0.16.1" websocket = "0.17"

View file

@ -26,7 +26,7 @@ use std::borrow::ToOwned;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use time::{self, Timespec, now}; use time::{self, Timespec, now};
use unicase::UniCase; use unicase::UniCase;
use url::{SchemeData, Url}; use url::Url;
use util::thread::spawn_named; use util::thread::spawn_named;
/// Interface for network listeners concerned with CORS checks. Proper network requests /// Interface for network listeners concerned with CORS checks. Proper network requests
@ -67,14 +67,13 @@ impl CORSRequest {
headers: Headers, headers: Headers,
same_origin_data_url_flag: bool) same_origin_data_url_flag: bool)
-> Result<Option<CORSRequest>, ()> { -> Result<Option<CORSRequest>, ()> {
if referer.scheme == destination.scheme && referer.host() == destination.host() && if referer.origin() == destination.origin() {
referer.port() == destination.port() {
return Ok(None); // Not cross-origin, proceed with a normal fetch return Ok(None); // Not cross-origin, proceed with a normal fetch
} }
match &*destination.scheme { match destination.scheme() {
// As per (https://fetch.spec.whatwg.org/#main-fetch 5.1.9), about URLs can be fetched // As per (https://fetch.spec.whatwg.org/#main-fetch 5.1.9), about URLs can be fetched
// the same as a basic request. // the same as a basic request.
"about" if destination.path() == Some(&["blank".to_owned()]) => Ok(None), "about" if destination.path() == "blank" => Ok(None),
// As per (https://fetch.spec.whatwg.org/#main-fetch 5.1.9), data URLs can be fetched // As per (https://fetch.spec.whatwg.org/#main-fetch 5.1.9), data URLs can be fetched
// the same as a basic request if the request's method is GET and the // the same as a basic request if the request's method is GET and the
// same-origin data-URL flag is set. // same-origin data-URL flag is set.
@ -98,11 +97,9 @@ impl CORSRequest {
method: Method, method: Method,
headers: Headers) headers: Headers)
-> CORSRequest { -> CORSRequest {
if let SchemeData::Relative(ref mut data) = referer.scheme_data { referer.set_fragment(None);
data.path = vec![]; referer.set_query(None);
} referer.set_path("");
referer.fragment = None;
referer.query = None;
CORSRequest { CORSRequest {
origin: referer, origin: referer,
destination: destination, destination: destination,
@ -404,8 +401,10 @@ impl CORSCache {
self.cleanup(); self.cleanup();
// Credentials are not yet implemented here // Credentials are not yet implemented here
self.0.iter_mut().find(|e| { self.0.iter_mut().find(|e| {
e.origin.scheme == request.origin.scheme && e.origin.host() == request.origin.host() && e.origin.scheme() == request.origin.scheme() &&
e.origin.port() == request.origin.port() && e.url == request.destination && e.origin.host_str() == request.origin.host_str() &&
e.origin.port() == request.origin.port() &&
e.url == request.destination &&
e.header_or_method.match_header(header_name) e.header_or_method.match_header(header_name)
}) })
} }
@ -430,8 +429,10 @@ impl CORSCache {
self.cleanup(); self.cleanup();
// Credentials are not yet implemented here // Credentials are not yet implemented here
self.0.iter_mut().find(|e| { self.0.iter_mut().find(|e| {
e.origin.scheme == request.origin.scheme && e.origin.host() == request.origin.host() && e.origin.scheme() == request.origin.scheme() &&
e.origin.port() == request.origin.port() && e.url == request.destination && e.origin.host_str() == request.origin.host_str() &&
e.origin.port() == request.origin.port() &&
e.url == request.destination &&
e.header_or_method.match_method(method) e.header_or_method.match_method(method)
}) })
} }
@ -484,7 +485,7 @@ fn is_simple_method(m: &Method) -> bool {
pub fn allow_cross_origin_request(req: &CORSRequest, headers: &Headers) -> bool { pub fn allow_cross_origin_request(req: &CORSRequest, headers: &Headers) -> bool {
match headers.get::<AccessControlAllowOrigin>() { match headers.get::<AccessControlAllowOrigin>() {
Some(&AccessControlAllowOrigin::Any) => true, // Not always true, depends on credentials mode Some(&AccessControlAllowOrigin::Any) => true, // Not always true, depends on credentials mode
Some(&AccessControlAllowOrigin::Value(ref url)) => req.origin.serialize() == *url, Some(&AccessControlAllowOrigin::Value(ref url)) => req.origin.as_str() == *url,
Some(&AccessControlAllowOrigin::Null) | Some(&AccessControlAllowOrigin::Null) |
None => false, None => false,
} }

View file

@ -218,7 +218,7 @@ impl DedicatedWorkerGlobalScope {
parent_sender: Box<ScriptChan + Send>, parent_sender: Box<ScriptChan + Send>,
own_sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>, own_sender: Sender<(TrustedWorkerAddress, WorkerScriptMsg)>,
receiver: Receiver<(TrustedWorkerAddress, WorkerScriptMsg)>) { receiver: Receiver<(TrustedWorkerAddress, WorkerScriptMsg)>) {
let serialized_worker_url = worker_url.serialize(); let serialized_worker_url = worker_url.to_string();
spawn_named(format!("WebWorker for {}", serialized_worker_url), move || { spawn_named(format!("WebWorker for {}", serialized_worker_url), move || {
thread_state::initialize(SCRIPT | IN_WORKER); thread_state::initialize(SCRIPT | IN_WORKER);

View file

@ -515,7 +515,7 @@ impl Document {
self.GetDocumentElement() self.GetDocumentElement()
} else { } else {
// Step 3 & 4 // Step 3 & 4
String::from_utf8(percent_decode(fragid.as_bytes())).ok() percent_decode(fragid.as_bytes()).decode_utf8().ok()
// Step 5 // Step 5
.and_then(|decoded_fragid| self.get_element_by_id(&Atom::from(decoded_fragid))) .and_then(|decoded_fragid| self.get_element_by_id(&Atom::from(decoded_fragid)))
// Step 6 // Step 6
@ -1585,7 +1585,7 @@ impl LayoutDocumentHelpers for LayoutJS<Document> {
/// https://url.spec.whatwg.org/#network-scheme /// https://url.spec.whatwg.org/#network-scheme
fn url_has_network_scheme(url: &Url) -> bool { fn url_has_network_scheme(url: &Url) -> bool {
match &*url.scheme { match url.scheme() {
"ftp" | "http" | "https" => true, "ftp" | "http" | "https" => true,
_ => false, _ => false,
} }
@ -1844,7 +1844,7 @@ impl DocumentMethods for Document {
// https://dom.spec.whatwg.org/#dom-document-url // https://dom.spec.whatwg.org/#dom-document-url
fn URL(&self) -> DOMString { fn URL(&self) -> DOMString {
DOMString::from(self.url().serialize()) DOMString::from(self.url().as_str())
} }
// https://html.spec.whatwg.org/multipage/#dom-document-activeelement // https://html.spec.whatwg.org/multipage/#dom-document-activeelement
@ -1886,7 +1886,7 @@ impl DocumentMethods for Document {
if let Some(host) = self.origin.host() { if let Some(host) = self.origin.host() {
// Step 4. // Step 4.
DOMString::from(host.serialize()) DOMString::from(host.to_string())
} else { } else {
// Step 3. // Step 3.
DOMString::new() DOMString::new()

View file

@ -1113,7 +1113,7 @@ impl Element {
// https://html.spec.whatwg.org/multipage/#reflect // https://html.spec.whatwg.org/multipage/#reflect
// XXXManishearth this doesn't handle `javascript:` urls properly // XXXManishearth this doesn't handle `javascript:` urls properly
match base.join(&url) { match base.join(&url) {
Ok(parsed) => DOMString::from(parsed.serialize()), Ok(parsed) => DOMString::from(parsed.into_string()),
Err(_) => DOMString::from(""), Err(_) => DOMString::from(""),
} }
} }

View file

@ -82,7 +82,7 @@ impl EventSourceMethods for EventSource {
// https://html.spec.whatwg.org/multipage/#dom-eventsource-url // https://html.spec.whatwg.org/multipage/#dom-eventsource-url
fn Url(&self) -> DOMString { fn Url(&self) -> DOMString {
DOMString::from(self.url.serialize()) DOMString::from(self.url.as_str())
} }
// https://html.spec.whatwg.org/multipage/#dom-eventsource-withcredentials // https://html.spec.whatwg.org/multipage/#dom-eventsource-withcredentials

View file

@ -397,7 +397,7 @@ impl EventTarget {
// Step 1.6 // Step 1.6
let window = document.window(); let window = document.window();
let url_serialized = CString::new(handler.url.serialize()).unwrap(); let url_serialized = CString::new(handler.url.to_string()).unwrap();
let name = CString::new(&**ty).unwrap(); let name = CString::new(&**ty).unwrap();
static mut ARG_NAMES: [*const c_char; 1] = [b"event\0" as *const u8 as *const c_char]; static mut ARG_NAMES: [*const c_char; 1] = [b"event\0" as *const u8 as *const c_char];

View file

@ -28,7 +28,7 @@ use dom::virtualmethods::VirtualMethods;
use num_traits::ToPrimitive; use num_traits::ToPrimitive;
use std::default::Default; use std::default::Default;
use string_cache::Atom; use string_cache::Atom;
use url::{Url, UrlParser}; use url::Url;
use util::str::DOMString; use util::str::DOMString;
#[dom_struct] #[dom_struct]
@ -63,9 +63,7 @@ impl HTMLAnchorElement {
let attribute = self.upcast::<Element>().get_attribute(&ns!(), &atom!("href")); let attribute = self.upcast::<Element>().get_attribute(&ns!(), &atom!("href"));
*self.url.borrow_mut() = attribute.and_then(|attribute| { *self.url.borrow_mut() = attribute.and_then(|attribute| {
let document = document_from_node(self); let document = document_from_node(self);
let mut parser = UrlParser::new(); document.url().join(&attribute.value()).ok()
parser.base_url(document.url());
parser.parse(&attribute.value()).ok()
}); });
} }
@ -74,8 +72,7 @@ impl HTMLAnchorElement {
// Step 1. // Step 1.
match *self.url.borrow() { match *self.url.borrow() {
None => return, None => return,
Some(ref url) if url.scheme == "blob" && Some(ref url) if url.scheme() == "blob" && url.cannot_be_a_base() => return,
url.non_relative_scheme_data().is_some() => return,
_ => (), _ => (),
} }
@ -86,7 +83,7 @@ impl HTMLAnchorElement {
// https://html.spec.whatwg.org/multipage/#update-href // https://html.spec.whatwg.org/multipage/#update-href
fn update_href(&self) { fn update_href(&self) {
self.upcast::<Element>().set_string_attribute(&atom!("href"), self.upcast::<Element>().set_string_attribute(&atom!("href"),
self.url.borrow().as_ref().unwrap().serialize().into()); self.url.borrow().as_ref().unwrap().as_str().into());
} }
} }
@ -167,7 +164,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
// Step 3. // Step 3.
if let Some(url) = self.url.borrow_mut().as_mut() { if let Some(url) = self.url.borrow_mut().as_mut() {
if url.scheme == "javascript" { return; } if url.scheme() == "javascript" { return; }
// Steps 4-5. // Steps 4-5.
UrlHelper::SetHash(url, value); UrlHelper::SetHash(url, value);
// Step 6. // Step 6.
@ -201,7 +198,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
// Step 3. // Step 3.
if let Some(url) = self.url.borrow_mut().as_mut() { if let Some(url) = self.url.borrow_mut().as_mut() {
if url.non_relative_scheme_data().is_some() { if url.cannot_be_a_base() {
return; return;
} }
// Step 4. // Step 4.
@ -233,7 +230,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
// Step 3. // Step 3.
if let Some(url) = self.url.borrow_mut().as_mut() { if let Some(url) = self.url.borrow_mut().as_mut() {
if url.non_relative_scheme_data().is_some() { if url.cannot_be_a_base() {
return; return;
} }
// Step 4. // Step 4.
@ -258,7 +255,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
} }
}, },
// Step 5. // Step 5.
Some(ref url) => url.serialize(), Some(ref url) => url.as_str().to_owned(),
}) })
} }
@ -289,7 +286,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
// Step 3. // Step 3.
if let Some(url) = self.url.borrow_mut().as_mut() { if let Some(url) = self.url.borrow_mut().as_mut() {
if url.host().is_none() || url.non_relative_scheme_data().is_some() { if url.host().is_none() || url.cannot_be_a_base() {
return; return;
} }
// Step 4. // Step 4.
@ -319,7 +316,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
// Step 3. // Step 3.
if let Some(url) = self.url.borrow_mut().as_mut() { if let Some(url) = self.url.borrow_mut().as_mut() {
if url.non_relative_scheme_data().is_some() { return; } if url.cannot_be_a_base() { return; }
// Step 5. // Step 5.
UrlHelper::SetPathname(url, value); UrlHelper::SetPathname(url, value);
// Step 6. // Step 6.
@ -348,8 +345,8 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
// Step 3. // Step 3.
if let Some(url) = self.url.borrow_mut().as_mut() { if let Some(url) = self.url.borrow_mut().as_mut() {
if url.host().is_none() || if url.host().is_none() ||
url.non_relative_scheme_data().is_some() || url.cannot_be_a_base() ||
url.scheme == "file" { url.scheme() == "file" {
return; return;
} }
// Step 4. // Step 4.
@ -435,7 +432,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
// Step 3. // Step 3.
if let Some(url) = self.url.borrow_mut().as_mut() { if let Some(url) = self.url.borrow_mut().as_mut() {
if url.host().is_none() || url.non_relative_scheme_data().is_some() { if url.host().is_none() || url.cannot_be_a_base() {
return; return;
} }
@ -535,7 +532,7 @@ fn follow_hyperlink(subject: &Element, hyperlink_suffix: Option<String>) {
}; };
// Step 7. // Step 7.
debug!("following hyperlink to {}", url.serialize()); debug!("following hyperlink to {}", url);
let window = document.window(); let window = document.window();
window.load_url(url); window.load_url(url);
} }

View file

@ -68,7 +68,7 @@ impl HTMLBaseElementMethods for HTMLBaseElement {
// Step 1. // Step 1.
if !self.upcast::<Element>().has_attribute(&atom!("href")) { if !self.upcast::<Element>().has_attribute(&atom!("href")) {
return DOMString::from(document.base_url().serialize()); return DOMString::from(document.base_url().as_str());
} }
// Step 2. // Step 2.
@ -81,7 +81,7 @@ impl HTMLBaseElementMethods for HTMLBaseElement {
let url_record = fallback_base_url.join(&*url); let url_record = fallback_base_url.join(&*url);
// Step 5, 6. // Step 5, 6.
DOMString::from(url_record.ok().map_or("".to_owned(), |record| record.serialize())) DOMString::from(url_record.as_ref().map(|url| url.as_str()).unwrap_or(""))
} }
// https://html.spec.whatwg.org/multipage/#dom-base-href // https://html.spec.whatwg.org/multipage/#dom-base-href

View file

@ -44,7 +44,7 @@ use std::cell::Cell;
use std::sync::mpsc::Sender; use std::sync::mpsc::Sender;
use string_cache::Atom; use string_cache::Atom;
use task_source::dom_manipulation::DOMManipulationTask; use task_source::dom_manipulation::DOMManipulationTask;
use url::form_urlencoded::serialize; use url::form_urlencoded;
use util::str::DOMString; use util::str::DOMString;
#[derive(JSTraceable, PartialEq, Clone, Copy, HeapSizeOf)] #[derive(JSTraceable, PartialEq, Clone, Copy, HeapSizeOf)]
@ -269,7 +269,7 @@ impl HTMLFormElement {
let mut action = submitter.action(); let mut action = submitter.action();
// Step 8 // Step 8
if action.is_empty() { if action.is_empty() {
action = DOMString::from(base.serialize()); action = DOMString::from(base.as_str());
} }
// Step 9-11 // Step 9-11
let action_components = match base.join(&action) { let action_components = match base.join(&action) {
@ -277,8 +277,7 @@ impl HTMLFormElement {
Err(_) => return Err(_) => return
}; };
// Step 12-15 // Step 12-15
let _action = action_components.serialize(); let scheme = action_components.scheme().to_owned();
let scheme = action_components.scheme.clone();
let enctype = submitter.enctype(); let enctype = submitter.enctype();
let method = submitter.method(); let method = submitter.method();
let _target = submitter.target(); let _target = submitter.target();
@ -290,7 +289,9 @@ impl HTMLFormElement {
FormEncType::UrlEncoded => { FormEncType::UrlEncoded => {
let mime: mime::Mime = "application/x-www-form-urlencoded".parse().unwrap(); let mime: mime::Mime = "application/x-www-form-urlencoded".parse().unwrap();
load_data.headers.set(ContentType(mime)); load_data.headers.set(ContentType(mime));
serialize(form_data.iter().map(|d| (&*d.name, &*d.value))) form_urlencoded::Serializer::new(String::new())
.extend_pairs(form_data.into_iter().map(|field| (field.name, field.value)))
.finish()
} }
_ => "".to_owned() // TODO: Add serializers for the other encoding types _ => "".to_owned() // TODO: Add serializers for the other encoding types
}; };
@ -302,7 +303,8 @@ impl HTMLFormElement {
(_, FormMethod::FormDialog) => return, // Unimplemented (_, FormMethod::FormDialog) => return, // Unimplemented
// https://html.spec.whatwg.org/multipage/#submit-mutate-action // https://html.spec.whatwg.org/multipage/#submit-mutate-action
("http", FormMethod::FormGet) | ("https", FormMethod::FormGet) => { ("http", FormMethod::FormGet) | ("https", FormMethod::FormGet) => {
load_data.url.query = Some(parsed_data); // FIXME(SimonSapin): use url.query_pairs_mut() here.
load_data.url.set_query(Some(&*parsed_data));
self.plan_to_navigate(load_data, &win); self.plan_to_navigate(load_data, &win);
} }
// https://html.spec.whatwg.org/multipage/#submit-body // https://html.spec.whatwg.org/multipage/#submit-body

View file

@ -316,7 +316,7 @@ impl HTMLImageElementMethods for HTMLImageElement {
fn CurrentSrc(&self) -> DOMString { fn CurrentSrc(&self) -> DOMString {
let ref url = self.current_request.borrow().url; let ref url = self.current_request.borrow().url;
match *url { match *url {
Some(ref url) => DOMString::from(url.serialize()), Some(ref url) => DOMString::from(url.as_str()),
None => DOMString::from(""), None => DOMString::from(""),
} }
} }

View file

@ -448,7 +448,7 @@ impl HTMLScriptElement {
let window = window_from_node(self); let window = window_from_node(self);
let mut rval = RootedValue::new(window.get_cx(), UndefinedValue()); let mut rval = RootedValue::new(window.get_cx(), UndefinedValue());
window.evaluate_script_on_global_with_result(&*source, window.evaluate_script_on_global_with_result(&*source,
&*url.serialize(), url.as_str(),
rval.handle_mut()); rval.handle_mut());
// Step 2.b.7. // Step 2.b.7.

View file

@ -99,7 +99,7 @@ macro_rules! make_url_or_base_getter(
let url = element.get_url_attribute(&atom!($htmlname)); let url = element.get_url_attribute(&atom!($htmlname));
if url.is_empty() { if url.is_empty() {
let window = window_from_node(self); let window = window_from_node(self);
DOMString::from(window.get_url().serialize()) DOMString::from(window.get_url().into_string())
} else { } else {
url url
} }

View file

@ -274,8 +274,7 @@ impl AsyncResponseListener for ParserContext {
match content_type { match content_type {
Some(ContentType(Mime(TopLevel::Image, _, _))) => { Some(ContentType(Mime(TopLevel::Image, _, _))) => {
self.is_synthesized_document = true; self.is_synthesized_document = true;
let page = format!("<html><body><img src='{}' /></body></html>", let page = format!("<html><body><img src='{}' /></body></html>", self.url);
self.url.serialize());
parser.pending_input().borrow_mut().push(page); parser.pending_input().borrow_mut().push(page);
parser.parse_sync(); parser.parse_sync();
}, },
@ -336,7 +335,7 @@ impl AsyncResponseListener for ParserContext {
parser.r().document().finish_load(LoadType::PageSource(self.url.clone())); parser.r().document().finish_load(LoadType::PageSource(self.url.clone()));
if let Err(err) = status { if let Err(err) = status {
debug!("Failed to load page URL {}, error: {:?}", self.url.serialize(), err); debug!("Failed to load page URL {}, error: {:?}", self.url, err);
// TODO(Savago): we should send a notification to callers #5463. // TODO(Savago): we should send a notification to callers #5463.
} }

View file

@ -13,7 +13,7 @@ use dom::urlhelper::UrlHelper;
use dom::urlsearchparams::URLSearchParams; use dom::urlsearchparams::URLSearchParams;
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::default::Default; use std::default::Default;
use url::{Host, Url, UrlParser}; use url::{Host, Url};
use util::str::DOMString; use util::str::DOMString;
// https://url.spec.whatwg.org/#url // https://url.spec.whatwg.org/#url
@ -42,8 +42,9 @@ impl URL {
global, URLBinding::Wrap) global, URLBinding::Wrap)
} }
pub fn set_query(&self, query: String) { pub fn set_query_pairs(&self, pairs: &[(String, String)]) {
self.url.borrow_mut().query = Some(query); let mut url = self.url.borrow_mut();
url.query_pairs_mut().clear().extend_pairs(pairs);
} }
} }
@ -68,18 +69,12 @@ impl URL {
} }
}; };
// Step 3. // Step 3.
let parsed_url = { let parsed_url = match Url::options().base_url(parsed_base.as_ref()).parse(&url.0) {
let mut parser = UrlParser::new();
if let Some(parsed_base) = parsed_base.as_ref() {
parser.base_url(parsed_base);
}
match parser.parse(&url.0) {
Ok(url) => url, Ok(url) => url,
Err(error) => { Err(error) => {
// Step 4. // Step 4.
return Err(Error::Type(format!("could not parse URL: {}", error))); return Err(Error::Type(format!("could not parse URL: {}", error)));
} }
}
}; };
// Step 5: Skip (see step 8 below). // Step 5: Skip (see step 8 below).
// Steps 6-7. // Steps 6-7.
@ -207,7 +202,7 @@ impl URLMethods for URL {
fn SetSearch(&self, value: USVString) { fn SetSearch(&self, value: USVString) {
UrlHelper::SetSearch(&mut self.url.borrow_mut(), value); UrlHelper::SetSearch(&mut self.url.borrow_mut(), value);
if let Some(search_params) = self.search_params.get() { if let Some(search_params) = self.search_params.get() {
search_params.set_list(self.url.borrow().query_pairs().unwrap_or_else(|| vec![])); search_params.set_list(self.url.borrow().query_pairs().into_owned().collect());
} }
} }

View file

@ -4,166 +4,31 @@
use dom::bindings::str::USVString; use dom::bindings::str::USVString;
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::fmt::Write; use url::{Url, quirks};
use url::urlutils::{UrlUtils, UrlUtilsWrapper};
use url::{Origin, SchemeData, Url, UrlParser};
#[derive(HeapSizeOf)] #[derive(HeapSizeOf)]
pub struct UrlHelper; pub struct UrlHelper;
impl UrlHelper { impl UrlHelper {
pub fn Hash(url: &Url) -> USVString { pub fn SameOrigin(urlA: &Url, urlB: &Url) -> bool { urlA.origin() == urlB.origin() }
USVString(match url.fragment { pub fn Origin(url: &Url) -> USVString { USVString(quirks::origin(url)) }
None => "".to_owned(), pub fn Href(url: &Url) -> USVString { USVString(quirks::href(url).to_owned()) }
Some(ref hash) if hash.is_empty() => "".to_owned(), pub fn Hash(url: &Url) -> USVString { USVString(quirks::hash(url).to_owned()) }
Some(ref hash) => format!("#{}", hash) pub fn Host(url: &Url) -> USVString { USVString(quirks::host(url).to_owned()) }
}) pub fn Port(url: &Url) -> USVString { USVString(quirks::port(url).to_owned()) }
} pub fn Search(url: &Url) -> USVString { USVString(quirks::search(url).to_owned()) }
pub fn Hostname(url: &Url) -> USVString { USVString(quirks::hostname(url).to_owned()) }
pub fn SetHash(url: &mut Url, value: USVString) { pub fn Password(url: &Url) -> USVString { USVString(quirks::password(url).to_owned()) }
url.fragment = Some(String::new()); pub fn Pathname(url: &Url) -> USVString { USVString(quirks::pathname(url).to_owned()) }
let mut wrapper = UrlUtilsWrapper { url: url, parser: &UrlParser::new() }; pub fn Protocol(url: &Url) -> USVString { USVString(quirks::protocol(url).to_owned()) }
let _ = wrapper.set_fragment(&value.0); pub fn Username(url: &Url) -> USVString { USVString(quirks::username(url).to_owned()) }
} pub fn SetHash(url: &mut Url, value: USVString) { quirks::set_hash(url, &value.0) }
pub fn SetHost(url: &mut Url, value: USVString) { let _ = quirks::set_host(url, &value.0); }
pub fn Host(url: &Url) -> USVString { pub fn SetPort(url: &mut Url, value: USVString) { let _ = quirks::set_port(url, &value.0); }
USVString(match url.scheme_data { pub fn SetSearch(url: &mut Url, value: USVString) { quirks::set_search(url, &value.0) }
SchemeData::NonRelative(..) => "".to_owned(), pub fn SetPathname(url: &mut Url, value: USVString) { quirks::set_pathname(url, &value.0) }
SchemeData::Relative(ref scheme_data) => { pub fn SetHostname(url: &mut Url, value: USVString) { let _ = quirks::set_hostname(url, &value.0); }
let mut host = scheme_data.host.serialize(); pub fn SetPassword(url: &mut Url, value: USVString) { let _ = quirks::set_password(url, &value.0); }
if let Some(port) = scheme_data.port { pub fn SetProtocol(url: &mut Url, value: USVString) { let _ = quirks::set_protocol(url, &value.0); }
write!(host, ":{}", port).unwrap(); pub fn SetUsername(url: &mut Url, value: USVString) { let _ = quirks::set_username(url, &value.0); }
}
host
},
})
}
pub fn SetHost(url: &mut Url, value: USVString) {
let mut wrapper = UrlUtilsWrapper { url: url, parser: &UrlParser::new() };
let _ = wrapper.set_host(&value.0);
}
pub fn Origin(url: &Url) -> USVString {
USVString(match url.origin() {
Origin::UID(_) => {
// https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin
// If the origin in question is not a scheme/host/port tuple,
// then return the literal string "null" and abort these steps.
"null".to_owned()
},
Origin::Tuple(protocol, host, _) => {
let mut origin =
format!(
"{protocol}://{host}",
protocol = protocol,
host = host
);
if let Some(port) =
// https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin
// only append the port # to the serialized origin if the port is different from
// the default port for the protocol. If url.scheme_data.port is None, that
// indicates that the port is a default port
url.relative_scheme_data().and_then(|scheme| scheme.port) {
write!(origin, ":{}", port).unwrap();
};
origin
}
})
}
pub fn Hostname(url: &Url) -> USVString {
USVString(url.serialize_host().unwrap_or_else(|| "".to_owned()))
}
pub fn SetHostname(url: &mut Url, value: USVString) {
let mut wrapper = UrlUtilsWrapper { url: url, parser: &UrlParser::new() };
let _ = wrapper.set_host_and_port(&value.0);
}
pub fn Href(url: &Url) -> USVString {
USVString(url.serialize())
}
pub fn Password(url: &Url) -> USVString {
USVString(url.password().unwrap_or("").to_owned())
}
pub fn SetPassword(url: &mut Url, value: USVString) {
let mut wrapper = UrlUtilsWrapper { url: url, parser: &UrlParser::new() };
let _ = wrapper.set_password(&value.0);
}
pub fn Pathname(url: &Url) -> USVString {
USVString(match url.scheme_data {
SchemeData::NonRelative(ref scheme_data) => scheme_data.clone(),
SchemeData::Relative(..) => url.serialize_path().unwrap()
})
}
pub fn SetPathname(url: &mut Url, value: USVString) {
if let Some(path) = url.path_mut() {
path.clear();
}
let mut wrapper = UrlUtilsWrapper { url: url, parser: &UrlParser::new() };
let _ = wrapper.set_path(&value.0);
}
pub fn Port(url: &Url) -> USVString {
USVString(match url.port() {
None => "".to_owned(),
Some(port) => port.to_string(),
})
}
pub fn SetPort(url: &mut Url, value: USVString) {
let mut wrapper = UrlUtilsWrapper { url: url, parser: &UrlParser::new() };
let _ = wrapper.set_port(&value.0);
}
pub fn Protocol(url: &Url) -> USVString {
USVString(format!("{}:", url.scheme.clone()))
}
pub fn SetProtocol(url: &mut Url, value: USVString) {
let mut wrapper = UrlUtilsWrapper { url: url, parser: &UrlParser::new() };
let _ = wrapper.set_scheme(&value.0);
}
// https://html.spec.whatwg.org/multipage/#same-origin
pub fn SameOrigin(urlA: &Url, urlB: &Url) -> bool {
if urlA.host() != urlB.host() {
return false
}
if urlA.scheme != urlB.scheme {
return false
}
if urlA.port() != urlB.port() {
return false
}
true
}
pub fn Search(url: &Url) -> USVString {
USVString(match url.query {
None => "".to_owned(),
Some(ref query) if query.is_empty() => "".to_owned(),
Some(ref query) => format!("?{}", query)
})
}
pub fn SetSearch(url: &mut Url, value: USVString) {
url.query = Some(String::new());
let mut wrapper = UrlUtilsWrapper { url: url, parser: &UrlParser::new() };
let _ = wrapper.set_query(&value.0);
}
pub fn Username(url: &Url) -> USVString {
USVString(url.username().unwrap_or("").to_owned())
}
pub fn SetUsername(url: &mut Url, value: USVString) {
let mut wrapper = UrlUtilsWrapper { url: url, parser: &UrlParser::new() };
let _ = wrapper.set_username(&value.0);
}
} }

View file

@ -14,7 +14,7 @@ use dom::bindings::str::USVString;
use dom::bindings::weakref::MutableWeakRef; use dom::bindings::weakref::MutableWeakRef;
use dom::url::URL; use dom::url::URL;
use encoding::types::EncodingRef; use encoding::types::EncodingRef;
use url::form_urlencoded::{parse, serialize_with_encoding}; use url::form_urlencoded;
use util::str::DOMString; use util::str::DOMString;
// https://url.spec.whatwg.org/#interface-urlsearchparams // https://url.spec.whatwg.org/#interface-urlsearchparams
@ -49,7 +49,8 @@ impl URLSearchParams {
match init { match init {
Some(USVStringOrURLSearchParams::USVString(init)) => { Some(USVStringOrURLSearchParams::USVString(init)) => {
// Step 2. // Step 2.
*query.list.borrow_mut() = parse(init.0.as_bytes()); *query.list.borrow_mut() = form_urlencoded::parse(init.0.as_bytes())
.into_owned().collect();
}, },
Some(USVStringOrURLSearchParams::URLSearchParams(init)) => { Some(USVStringOrURLSearchParams::URLSearchParams(init)) => {
// Step 3. // Step 3.
@ -145,7 +146,10 @@ impl URLSearchParams {
// https://url.spec.whatwg.org/#concept-urlencoded-serializer // https://url.spec.whatwg.org/#concept-urlencoded-serializer
pub fn serialize(&self, encoding: Option<EncodingRef>) -> String { pub fn serialize(&self, encoding: Option<EncodingRef>) -> String {
let list = self.list.borrow(); let list = self.list.borrow();
serialize_with_encoding(list.iter(), encoding) form_urlencoded::Serializer::new(String::new())
.encoding_override(encoding)
.extend_pairs(&*list)
.finish()
} }
} }
@ -154,7 +158,7 @@ impl URLSearchParams {
// https://url.spec.whatwg.org/#concept-urlsearchparams-update // https://url.spec.whatwg.org/#concept-urlsearchparams-update
fn update_steps(&self) { fn update_steps(&self) {
if let Some(url) = self.url.root() { if let Some(url) = self.url.root() {
url.set_query(self.serialize(None)); url.set_query_pairs(&self.list.borrow())
} }
} }
} }

View file

@ -210,7 +210,7 @@ impl WebSocket {
// Step 2: Disallow https -> ws connections. // Step 2: Disallow https -> ws connections.
// Step 3: Potentially block access to some ports. // Step 3: Potentially block access to some ports.
let port: u16 = resource_url.port_or_default().unwrap(); let port: u16 = resource_url.port_or_known_default().unwrap();
if BLOCKED_PORTS_LIST.iter().any(|&p| p == port) { if BLOCKED_PORTS_LIST.iter().any(|&p| p == port) {
return Err(Error::Security); return Err(Error::Security);
@ -356,7 +356,7 @@ impl WebSocketMethods for WebSocket {
// https://html.spec.whatwg.org/multipage/#dom-websocket-url // https://html.spec.whatwg.org/multipage/#dom-websocket-url
fn Url(&self) -> DOMString { fn Url(&self) -> DOMString {
DOMString::from(self.url.serialize()) DOMString::from(self.url.as_str())
} }
// https://html.spec.whatwg.org/multipage/#dom-websocket-readystate // https://html.spec.whatwg.org/multipage/#dom-websocket-readystate

View file

@ -225,7 +225,7 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope {
}; };
match self.runtime.evaluate_script( match self.runtime.evaluate_script(
self.reflector().get_jsobject(), source, url.serialize(), 1) { self.reflector().get_jsobject(), source, url.to_string(), 1) {
Ok(_) => (), Ok(_) => (),
Err(_) => { Err(_) => {
println!("evaluate_script failed"); println!("evaluate_script failed");
@ -317,7 +317,7 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope {
impl WorkerGlobalScope { impl WorkerGlobalScope {
pub fn execute_script(&self, source: DOMString) { pub fn execute_script(&self, source: DOMString) {
match self.runtime.evaluate_script( match self.runtime.evaluate_script(
self.reflector().get_jsobject(), String::from(source), self.worker_url.serialize(), 1) { self.reflector().get_jsobject(), String::from(source), self.worker_url.to_string(), 1) {
Ok(_) => (), Ok(_) => (),
Err(_) => { Err(_) => {
if self.is_closing() { if self.is_closing() {

View file

@ -60,8 +60,7 @@ use std::sync::{Arc, Mutex};
use string_cache::Atom; use string_cache::Atom;
use time; use time;
use timers::{OneshotTimerCallback, OneshotTimerHandle}; use timers::{OneshotTimerCallback, OneshotTimerHandle};
use url::Url; use url::{Url, Position};
use url::percent_encoding::{utf8_percent_encode, USERNAME_ENCODE_SET, PASSWORD_ENCODE_SET};
use util::prefs; use util::prefs;
use util::str::DOMString; use util::str::DOMString;
@ -360,15 +359,10 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
// Step 9 // Step 9
if parsed_url.host().is_some() { if parsed_url.host().is_some() {
if let Some(scheme_data) = parsed_url.relative_scheme_data_mut() {
if let Some(user_str) = username { if let Some(user_str) = username {
scheme_data.username = utf8_percent_encode(&user_str.0, USERNAME_ENCODE_SET); parsed_url.set_username(&user_str.0).unwrap();
let password = password.as_ref().map(|pass_str| &*pass_str.0);
// ensure that the password is mutated when a username is provided parsed_url.set_password(password).unwrap();
scheme_data.password = password.map(|pass_str| {
utf8_percent_encode(&pass_str.0, PASSWORD_ENCODE_SET)
});
}
} }
} }
@ -628,24 +622,8 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
true); true);
match cors_request { match cors_request {
Ok(None) => { Ok(None) => {
let mut buf = String::new(); let bytes = referer_url[..Position::AfterPath].as_bytes().to_vec();
buf.push_str(&referer_url.scheme); self.request_headers.borrow_mut().set_raw("Referer".to_owned(), vec![bytes]);
buf.push_str("://");
if let Some(ref h) = referer_url.serialize_host() {
buf.push_str(h);
}
if let Some(ref p) = referer_url.port().as_ref() {
buf.push_str(":");
buf.push_str(&p.to_string());
}
if let Some(ref h) = referer_url.serialize_path() {
buf.push_str(h);
}
self.request_headers.borrow_mut().set_raw("Referer".to_owned(), vec![buf.into_bytes()]);
}, },
Ok(Some(ref req)) => self.insert_trusted_header("origin".to_owned(), Ok(Some(ref req)) => self.insert_trusted_header("origin".to_owned(),
req.origin.to_string()), req.origin.to_string()),
@ -909,7 +887,7 @@ impl XMLHttpRequest {
debug!("Bypassing cross origin check"); debug!("Bypassing cross origin check");
} }
*self.response_url.borrow_mut() = metadata.final_url.serialize_no_fragment(); *self.response_url.borrow_mut() = metadata.final_url[..Position::AfterQuery].to_owned();
// XXXManishearth Clear cache entries in case of a network error // XXXManishearth Clear cache entries in case of a network error
self.process_partial_response(XHRProgress::HeadersReceived(gen_id, metadata.headers, metadata.status)); self.process_partial_response(XHRProgress::HeadersReceived(gen_id, metadata.headers, metadata.status));

View file

@ -2,9 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use std::cell::RefCell; use ref_filter_map::ref_filter_map;
use std::cell::{RefCell, Ref};
use std::rc::Rc; use std::rc::Rc;
use url::{OpaqueOrigin, Origin as UrlOrigin}; use url::Origin as UrlOrigin;
use url::{Url, Host}; use url::{Url, Host};
/// A representation of an [origin](https://html.spec.whatwg.org/multipage/#origin-2). /// A representation of an [origin](https://html.spec.whatwg.org/multipage/#origin-2).
@ -21,9 +22,8 @@ no_jsmanaged_fields!(Origin);
impl Origin { impl Origin {
/// Create a new origin comprising a unique, opaque identifier. /// Create a new origin comprising a unique, opaque identifier.
pub fn opaque_identifier() -> Origin { pub fn opaque_identifier() -> Origin {
let opaque = UrlOrigin::UID(OpaqueOrigin::new());
Origin { Origin {
inner: Rc::new(RefCell::new(opaque)), inner: Rc::new(RefCell::new(UrlOrigin::new_opaque())),
} }
} }
@ -40,18 +40,15 @@ impl Origin {
/// Does this origin represent a host/scheme/port tuple? /// Does this origin represent a host/scheme/port tuple?
pub fn is_scheme_host_port_tuple(&self) -> bool { pub fn is_scheme_host_port_tuple(&self) -> bool {
match *self.inner.borrow() { self.inner.borrow().is_tuple()
UrlOrigin::Tuple(..) => true,
UrlOrigin::UID(..) => false,
}
} }
/// Return the host associated with this origin. /// Return the host associated with this origin.
pub fn host(&self) -> Option<Host> { pub fn host(&self) -> Option<Ref<Host<String>>> {
match *self.inner.borrow() { ref_filter_map(self.inner.borrow(), |origin| match *origin {
UrlOrigin::Tuple(_, ref host, _) => Some(host.clone()), UrlOrigin::Tuple(_, ref host, _) => Some(host),
UrlOrigin::UID(..) => None, UrlOrigin::Opaque(..) => None,
} })
} }
/// https://html.spec.whatwg.org/multipage/#same-origin /// https://html.spec.whatwg.org/multipage/#same-origin

View file

@ -100,7 +100,7 @@ use task_source::history_traversal::HistoryTraversalTaskSource;
use task_source::networking::NetworkingTaskSource; use task_source::networking::NetworkingTaskSource;
use task_source::user_interaction::UserInteractionTaskSource; use task_source::user_interaction::UserInteractionTaskSource;
use time::Tm; use time::Tm;
use url::Url; use url::{Url, Position};
use util::opts; use util::opts;
use util::str::DOMString; use util::str::DOMString;
use util::thread; use util::thread;
@ -1132,8 +1132,7 @@ impl ScriptThread {
if let Some(root_page) = self.page.borrow().as_ref() { if let Some(root_page) = self.page.borrow().as_ref() {
for it_page in root_page.iter() { for it_page in root_page.iter() {
let current_url = it_page.document().url().serialize(); let current_url = it_page.document().url().to_string();
urls.push(current_url.clone());
for child in it_page.document().upcast::<Node>().traverse_preorder() { for child in it_page.document().upcast::<Node>().traverse_preorder() {
dom_tree_size += heap_size_of_self_and_children(&*child); dom_tree_size += heap_size_of_self_and_children(&*child);
@ -1145,7 +1144,8 @@ impl ScriptThread {
path: path![format!("url({})", current_url), "dom-tree"], path: path![format!("url({})", current_url), "dom-tree"],
kind: ReportKind::ExplicitJemallocHeapSize, kind: ReportKind::ExplicitJemallocHeapSize,
size: dom_tree_size, size: dom_tree_size,
}) });
urls.push(current_url);
} }
} }
let path_seg = format!("url({})", urls.join(", ")); let path_seg = format!("url({})", urls.join(", "));
@ -1387,7 +1387,7 @@ impl ScriptThread {
let ConstellationChan(ref chan) = self.constellation_chan; let ConstellationChan(ref chan) = self.constellation_chan;
chan.send(ConstellationMsg::SetFinalUrl(incomplete.pipeline_id, final_url.clone())).unwrap(); chan.send(ConstellationMsg::SetFinalUrl(incomplete.pipeline_id, final_url.clone())).unwrap();
} }
debug!("ScriptThread: loading {} on page {:?}", incomplete.url.serialize(), incomplete.pipeline_id); debug!("ScriptThread: loading {} on page {:?}", incomplete.url, incomplete.pipeline_id);
let frame_element = incomplete.parent_info.and_then(|(parent_id, subpage_id)| { let frame_element = incomplete.parent_info.and_then(|(parent_id, subpage_id)| {
// The root page may not exist yet, if the parent of this frame // The root page may not exist yet, if the parent of this frame
@ -1554,30 +1554,22 @@ impl ScriptThread {
// Notify devtools that a new script global exists. // Notify devtools that a new script global exists.
self.notify_devtools(document.Title(), final_url.clone(), (page.pipeline(), None)); self.notify_devtools(document.Title(), final_url.clone(), (page.pipeline(), None));
let is_javascript = incomplete.url.scheme == "javascript"; let is_javascript = incomplete.url.scheme() == "javascript";
let parse_input = if is_javascript { let parse_input = if is_javascript {
use url::percent_encoding::percent_decode_to; use url::percent_encoding::percent_decode;
// Turn javascript: URL into JS code to eval, according to the steps in // Turn javascript: URL into JS code to eval, according to the steps in
// https://html.spec.whatwg.org/multipage/#javascript-protocol // https://html.spec.whatwg.org/multipage/#javascript-protocol
let _ar = JSAutoRequest::new(self.get_cx()); let _ar = JSAutoRequest::new(self.get_cx());
let mut script_source_bytes = Vec::new();
// Start with the scheme data of the parsed URL (5.), while percent-decoding (8.)
percent_decode_to(incomplete.url.non_relative_scheme_data().unwrap().as_bytes(),
&mut script_source_bytes);
// Append question mark and query component, if any (6.), while percent-decoding (8.)
if let Some(ref query) = incomplete.url.query {
script_source_bytes.push(b'?');
percent_decode_to(query.as_bytes(), &mut script_source_bytes);
}
// Append number sign and fragment component if any (7.), while percent-decoding (8.)
if let Some(ref fragment) = incomplete.url.fragment {
script_source_bytes.push(b'#');
percent_decode_to(fragment.as_bytes(), &mut script_source_bytes);
}
// UTF-8 decode (9.) // This slice of the URLs serialization is equivalent to (5.) to (7.):
let script_source = String::from_utf8_lossy(&script_source_bytes); // Start with the scheme data of the parsed URL;
// append question mark and query component, if any;
// append number sign and fragment component if any.
let encoded = &incomplete.url[Position::BeforePath..];
// Percent-decode (8.) and UTF-8 decode (9.)
let script_source = percent_decode(encoded.as_bytes()).decode_utf8_lossy();
// Script source is ready to be evaluated (11.) // Script source is ready to be evaluated (11.)
unsafe { unsafe {
@ -1706,7 +1698,7 @@ impl ScriptThread {
.and_then(|href| { .and_then(|href| {
let value = href.value(); let value = href.value();
let url = document.url(); let url = document.url();
url.join(&value).map(|url| url.serialize()).ok() url.join(&value).map(|url| url.to_string()).ok()
}); });
let event = ConstellationMsg::NodeStatus(status); let event = ConstellationMsg::NodeStatus(status);
@ -1795,14 +1787,14 @@ impl ScriptThread {
// Step 8. // Step 8.
{ {
let nurl = &load_data.url; let nurl = &load_data.url;
if let Some(ref fragment) = nurl.fragment { if let Some(fragment) = nurl.fragment() {
let page = get_page(&self.root_page(), pipeline_id); let page = get_page(&self.root_page(), pipeline_id);
let document = page.document(); let document = page.document();
let document = document.r(); let document = document.r();
let url = document.url(); let url = document.url();
if url.scheme == nurl.scheme && url.scheme_data == nurl.scheme_data && if &url[..Position::AfterQuery] == &nurl[..Position::AfterQuery] &&
url.query == nurl.query && load_data.method == Method::Get { load_data.method == Method::Get {
match document.find_fragment_node(&*fragment) { match document.find_fragment_node(fragment) {
Some(ref node) => { Some(ref node) => {
self.scroll_fragment_point(pipeline_id, node.r()); self.scroll_fragment_point(pipeline_id, node.r());
} }
@ -1881,7 +1873,7 @@ impl ScriptThread {
sender: action_sender, sender: action_sender,
}; };
if load_data.url.scheme == "javascript" { if load_data.url.scheme() == "javascript" {
load_data.url = Url::parse("about:blank").unwrap(); load_data.url = Url::parse("about:blank").unwrap();
} }
@ -1928,7 +1920,7 @@ impl ScriptThread {
// https://html.spec.whatwg.org/multipage/#the-end steps 3-4. // https://html.spec.whatwg.org/multipage/#the-end steps 3-4.
document.process_deferred_scripts(); document.process_deferred_scripts();
window.set_fragment_name(final_url.fragment.clone()); window.set_fragment_name(final_url.fragment().map(str::to_owned));
} }
fn handle_css_error_reporting(&self, pipeline_id: PipelineId, filename: String, fn handle_css_error_reporting(&self, pipeline_id: PipelineId, filename: String,

View file

@ -48,4 +48,4 @@ offscreen_gl_context = "0.1.2"
serde = "0.7" serde = "0.7"
serde_macros = "0.7" serde_macros = "0.7"
time = "0.1.12" time = "0.1.12"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -39,7 +39,7 @@ dependencies = [
"script_traits 0.0.1", "script_traits 0.0.1",
"style 0.0.1", "style 0.0.1",
"style_tests 0.0.1", "style_tests 0.0.1",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"util_tests 0.0.1", "util_tests 0.0.1",
"webdriver_server 0.0.1", "webdriver_server 0.0.1",
@ -308,7 +308,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender 0.1.0 (git+https://github.com/servo/webrender)", "webrender 0.1.0 (git+https://github.com/servo/webrender)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
@ -316,13 +316,13 @@ dependencies = [
[[package]] [[package]]
name = "cookie" name = "cookie"
version = "0.2.2" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -401,7 +401,7 @@ name = "devtools"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
@ -419,14 +419,14 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -702,7 +702,7 @@ dependencies = [
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -778,7 +778,7 @@ dependencies = [
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-glutin 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "servo-glutin 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -883,10 +883,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "hyper" name = "hyper"
version = "0.8.0" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"httparse 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"language-tags 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -900,7 +900,17 @@ dependencies = [
"traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "idna"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1062,7 +1072,7 @@ dependencies = [
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -1086,7 +1096,7 @@ dependencies = [
"script_traits 0.0.1", "script_traits 0.0.1",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -1243,14 +1253,14 @@ dependencies = [
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.4 (git+https://github.com/servo/rust-layers)", "layers 0.2.4 (git+https://github.com/servo/rust-layers)",
"plugins 0.0.1", "plugins 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -1260,13 +1270,14 @@ name = "net"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"brotli 0.3.20 (git+https://github.com/ende76/brotli-rs)", "brotli 0.3.20 (git+https://github.com/ende76/brotli-rs)",
"cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"immeta 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "immeta 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mime_guess 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1", "msg 0.0.1",
@ -1278,11 +1289,11 @@ dependencies = [
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)", "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
"websocket 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1301,10 +1312,10 @@ dependencies = [
name = "net_tests" name = "net_tests"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
@ -1312,7 +1323,7 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -1322,7 +1333,7 @@ version = "0.0.1"
dependencies = [ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1331,9 +1342,9 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"websocket 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1763,7 +1774,7 @@ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"js 0.1.2 (git+https://github.com/servo/rust-mozjs)", "js 0.1.2 (git+https://github.com/servo/rust-mozjs)",
@ -1791,11 +1802,11 @@ dependencies = [
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
"websocket 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"xml5ever 0.1.1 (git+https://github.com/Ygg01/xml5ever)", "xml5ever 0.1.1 (git+https://github.com/Ygg01/xml5ever)",
] ]
@ -1806,7 +1817,7 @@ dependencies = [
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
"script 0.0.1", "script 0.0.1",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -1832,7 +1843,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -2047,7 +2058,7 @@ dependencies = [
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -2064,7 +2075,7 @@ dependencies = [
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"style_traits 0.0.1", "style_traits 0.0.1",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -2083,7 +2094,7 @@ dependencies = [
"selectors 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -2202,18 +2213,16 @@ dependencies = [
[[package]] [[package]]
name = "url" name = "url"
version = "0.5.9" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2263,7 +2272,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2343,10 +2352,10 @@ dependencies = [
[[package]] [[package]]
name = "webdriver" name = "webdriver"
version = "0.8.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2357,7 +2366,7 @@ name = "webdriver_server"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"compositing 0.0.1", "compositing 0.0.1",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2365,10 +2374,10 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webdriver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "webdriver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2412,18 +2421,18 @@ dependencies = [
[[package]] [[package]]
name = "websocket" name = "websocket"
version = "0.16.2" version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"net2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]

View file

@ -171,4 +171,4 @@ bitflags = "0.3"
env_logger = "0.3" env_logger = "0.3"
euclid = {version = "0.6.4", features = ["plugins"]} euclid = {version = "0.6.4", features = ["plugins"]}
libc = "0.2" libc = "0.2"
url = {version = "0.5.7", features = ["heap_size", "serde_serialization", "query_encoding"]} url = {version = "1.0.0", features = ["heap_size", "serde", "query_encoding"]}

View file

@ -42,4 +42,4 @@ serde_macros = "0.7"
smallvec = "0.1" smallvec = "0.1"
string_cache = {version = "0.2.12", features = ["heap_size"]} string_cache = {version = "0.2.12", features = ["heap_size"]}
time = "0.1" time = "0.1"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -25,4 +25,4 @@ rustc-serialize = "0.3"
selectors = {version = "0.5", features = ["heap_size"]} selectors = {version = "0.5", features = ["heap_size"]}
serde = "0.7" serde = "0.7"
serde_macros = "0.7" serde_macros = "0.7"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -45,7 +45,7 @@ serde = "0.7"
serde_macros = "0.7" serde_macros = "0.7"
smallvec = "0.1" smallvec = "0.1"
string_cache = {version = "0.2.12", features = ["heap_size"]} string_cache = {version = "0.2.12", features = ["heap_size"]}
url = {version = "0.5.7", features = ["heap_size", "serde_serialization"]} url = {version = "1.0.0", features = ["heap_size", "serde"]}
[target.x86_64-pc-windows-gnu.dependencies] [target.x86_64-pc-windows-gnu.dependencies]
kernel32-sys = "0.2" kernel32-sys = "0.2"

View file

@ -26,9 +26,9 @@ git = "https://github.com/servo/ipc-channel"
[dependencies] [dependencies]
image = "0.9" image = "0.9"
log = "0.3.5" log = "0.3.5"
hyper = "0.8" hyper = "0.9"
rustc-serialize = "0.3.4" rustc-serialize = "0.3.4"
regex = "0.1.55" regex = "0.1.55"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}
uuid = { version = "0.2", features = ["v4"] } uuid = { version = "0.2", features = ["v4"] }
webdriver = "0.8" webdriver = "0.9"

View file

@ -353,7 +353,7 @@ impl Handler {
let url = receiver.recv().unwrap(); let url = receiver.recv().unwrap();
Ok(WebDriverResponse::Generic(ValueResponse::new(url.serialize().to_json()))) Ok(WebDriverResponse::Generic(ValueResponse::new(url.as_str().to_json())))
} }
fn handle_window_size(&self) -> WebDriverResult<WebDriverResponse> { fn handle_window_size(&self) -> WebDriverResult<WebDriverResponse> {

95
ports/cef/Cargo.lock generated
View file

@ -27,7 +27,7 @@ dependencies = [
"servo 0.0.1", "servo 0.0.1",
"style 0.0.1", "style 0.0.1",
"style_traits 0.0.1", "style_traits 0.0.1",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -278,7 +278,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender 0.1.0 (git+https://github.com/servo/webrender)", "webrender 0.1.0 (git+https://github.com/servo/webrender)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
@ -286,13 +286,13 @@ dependencies = [
[[package]] [[package]]
name = "cookie" name = "cookie"
version = "0.2.2" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -371,7 +371,7 @@ name = "devtools"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
@ -389,14 +389,14 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -631,7 +631,7 @@ dependencies = [
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -698,7 +698,7 @@ dependencies = [
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-glutin 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)", "servo-glutin 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -803,10 +803,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "hyper" name = "hyper"
version = "0.8.0" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"httparse 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"language-tags 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -820,7 +820,17 @@ dependencies = [
"traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "idna"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -982,7 +992,7 @@ dependencies = [
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -999,7 +1009,7 @@ dependencies = [
"script_traits 0.0.1", "script_traits 0.0.1",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -1156,14 +1166,14 @@ dependencies = [
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.4 (git+https://github.com/servo/rust-layers)", "layers 0.2.4 (git+https://github.com/servo/rust-layers)",
"plugins 0.0.1", "plugins 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -1173,13 +1183,14 @@ name = "net"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"brotli 0.3.20 (git+https://github.com/ende76/brotli-rs)", "brotli 0.3.20 (git+https://github.com/ende76/brotli-rs)",
"cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"immeta 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "immeta 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mime_guess 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1", "msg 0.0.1",
@ -1191,11 +1202,11 @@ dependencies = [
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)", "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
"websocket 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1216,7 +1227,7 @@ version = "0.0.1"
dependencies = [ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1225,9 +1236,9 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"websocket 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1631,7 +1642,7 @@ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"js 0.1.2 (git+https://github.com/servo/rust-mozjs)", "js 0.1.2 (git+https://github.com/servo/rust-mozjs)",
@ -1659,11 +1670,11 @@ dependencies = [
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
"websocket 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"xml5ever 0.1.1 (git+https://github.com/Ygg01/xml5ever)", "xml5ever 0.1.1 (git+https://github.com/Ygg01/xml5ever)",
] ]
@ -1689,7 +1700,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -1776,7 +1787,7 @@ dependencies = [
"script 0.0.1", "script 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"style 0.0.1", "style 0.0.1",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webdriver_server 0.0.1", "webdriver_server 0.0.1",
"webrender 0.1.0 (git+https://github.com/servo/webrender)", "webrender 0.1.0 (git+https://github.com/servo/webrender)",
@ -1941,7 +1952,7 @@ dependencies = [
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -1960,7 +1971,7 @@ dependencies = [
"selectors 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -2079,18 +2090,16 @@ dependencies = [
[[package]] [[package]]
name = "url" name = "url"
version = "0.5.9" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2140,7 +2149,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2209,10 +2218,10 @@ dependencies = [
[[package]] [[package]]
name = "webdriver" name = "webdriver"
version = "0.8.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2223,7 +2232,7 @@ name = "webdriver_server"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"compositing 0.0.1", "compositing 0.0.1",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2231,10 +2240,10 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.55 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webdriver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "webdriver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2278,18 +2287,18 @@ dependencies = [
[[package]] [[package]]
name = "websocket" name = "websocket"
version = "0.16.2" version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"net2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]

View file

@ -19,7 +19,7 @@ codegen-units = 4
euclid = {version = "0.6.4", features = ["plugins"]} euclid = {version = "0.6.4", features = ["plugins"]}
gleam = "0.2.8" gleam = "0.2.8"
libc = "0.2" libc = "0.2"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}
[dependencies.servo] [dependencies.servo]
path = "../../components/servo" path = "../../components/servo"

View file

@ -17,7 +17,7 @@ dependencies = [
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -188,6 +188,16 @@ name = "heapsize_plugin"
version = "0.1.4" version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "idna"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "ipc-channel" name = "ipc-channel"
version = "0.2.2" version = "0.2.2"
@ -458,7 +468,7 @@ dependencies = [
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -477,7 +487,7 @@ dependencies = [
"selectors 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -519,18 +529,15 @@ dependencies = [
[[package]] [[package]]
name = "url" name = "url"
version = "0.5.9" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -557,7 +564,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]

View file

@ -23,7 +23,7 @@ num_cpus = "0.2.2"
selectors = {version = "0.5", features = ["heap_size", "unstable"]} selectors = {version = "0.5", features = ["heap_size", "unstable"]}
smallvec = "0.1" smallvec = "0.1"
string_cache = {version = "0.2.12", features = ["heap_size", "unstable"]} string_cache = {version = "0.2.12", features = ["heap_size", "unstable"]}
url = {version = "0.5.7", features = ["heap_size", "query_encoding", "serde_serialization"]} url = {version = "1.0.0", features = ["heap_size", "query_encoding", "serde"]}
[dependencies.log] [dependencies.log]
version = "0.3.5" version = "0.3.5"

View file

@ -9,7 +9,7 @@ path = "lib.rs"
[dependencies] [dependencies]
bitflags = "0.4" bitflags = "0.4"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}
gleam = "0.2.8" gleam = "0.2.8"
euclid = {version = "0.6.4", features = ["plugins"]} euclid = {version = "0.6.4", features = ["plugins"]}
servo-glutin = "0.4" servo-glutin = "0.4"

83
ports/gonk/Cargo.lock generated
View file

@ -21,7 +21,7 @@ dependencies = [
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -271,7 +271,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender 0.1.0 (git+https://github.com/servo/webrender)", "webrender 0.1.0 (git+https://github.com/servo/webrender)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
@ -279,13 +279,13 @@ dependencies = [
[[package]] [[package]]
name = "cookie" name = "cookie"
version = "0.2.2" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -364,7 +364,7 @@ name = "devtools"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
@ -382,14 +382,14 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -634,7 +634,7 @@ dependencies = [
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -786,10 +786,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "hyper" name = "hyper"
version = "0.8.0" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"httparse 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"language-tags 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -803,7 +803,17 @@ dependencies = [
"traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "idna"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -965,7 +975,7 @@ dependencies = [
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -982,7 +992,7 @@ dependencies = [
"script_traits 0.0.1", "script_traits 0.0.1",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -1139,14 +1149,14 @@ dependencies = [
"euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.4 (git+https://github.com/servo/rust-layers)", "layers 0.2.4 (git+https://github.com/servo/rust-layers)",
"plugins 0.0.1", "plugins 0.0.1",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
] ]
@ -1156,13 +1166,14 @@ name = "net"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"brotli 0.3.20 (git+https://github.com/ende76/brotli-rs)", "brotli 0.3.20 (git+https://github.com/ende76/brotli-rs)",
"cookie 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"immeta 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "immeta 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mime_guess 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1", "msg 0.0.1",
@ -1174,11 +1185,11 @@ dependencies = [
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)", "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
"websocket 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1199,7 +1210,7 @@ version = "0.0.1"
dependencies = [ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1208,9 +1219,9 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"websocket 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1614,7 +1625,7 @@ dependencies = [
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)",
"js 0.1.2 (git+https://github.com/servo/rust-mozjs)", "js 0.1.2 (git+https://github.com/servo/rust-mozjs)",
@ -1642,11 +1653,11 @@ dependencies = [
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
"websocket 0.16.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"xml5ever 0.1.1 (git+https://github.com/Ygg01/xml5ever)", "xml5ever 0.1.1 (git+https://github.com/Ygg01/xml5ever)",
] ]
@ -1672,7 +1683,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -1758,7 +1769,7 @@ dependencies = [
"script 0.0.1", "script 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"style 0.0.1", "style 0.0.1",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"webrender 0.1.0 (git+https://github.com/servo/webrender)", "webrender 0.1.0 (git+https://github.com/servo/webrender)",
"webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)",
@ -1922,7 +1933,7 @@ dependencies = [
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -1941,7 +1952,7 @@ dependencies = [
"selectors 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -2060,18 +2071,16 @@ dependencies = [
[[package]] [[package]]
name = "url" name = "url"
version = "0.5.9" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2121,7 +2130,7 @@ dependencies = [
"serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2229,18 +2238,18 @@ dependencies = [
[[package]] [[package]]
name = "websocket" name = "websocket"
version = "0.16.2" version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"net2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]

View file

@ -49,7 +49,7 @@ features = ["non-geckolib"]
[dependencies] [dependencies]
env_logger = "0.3" env_logger = "0.3"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}
time = "0.1.17" time = "0.1.17"
errno = "0.1" errno = "0.1"
libc = "0.2" libc = "0.2"

View file

@ -3,6 +3,6 @@
<title>Certificate error</title> <title>Certificate error</title>
</head> </head>
<body> <body>
<img src="chrome://badcert.jpg"> <img src="chrome:/badcert.jpg">
</body> </body>
</html> </html>

View file

@ -31,8 +31,8 @@ git = "https://github.com/servo/ipc-channel"
[dependencies] [dependencies]
cookie = "0.2" cookie = "0.2"
hyper = "0.8" hyper = "0.9"
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}
time = "0.1" time = "0.1"
flate2 = "0.2.0" flate2 = "0.2.0"
unicase = "1.0" unicase = "1.0"

View file

@ -7,40 +7,40 @@ use url::Url;
#[test] #[test]
fn test_relative() { fn test_relative() {
let url = Url::parse("chrome://../something").unwrap(); let url = Url::parse("chrome:/../something").unwrap();
assert!(resolve_chrome_url(&url).is_err()); assert!(resolve_chrome_url(&url).is_err());
} }
#[test] #[test]
fn test_relative_2() { fn test_relative_2() {
let url = Url::parse("chrome://subdir/../something").unwrap(); let url = Url::parse("chrome:/subdir/../something").unwrap();
assert!(resolve_chrome_url(&url).is_err()); assert!(resolve_chrome_url(&url).is_err());
} }
#[test] #[test]
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
fn test_absolute() { fn test_absolute() {
let url = Url::parse("chrome:///etc/passwd").unwrap(); let url = Url::parse("chrome:/etc/passwd").unwrap();
assert!(resolve_chrome_url(&url).is_err()); assert!(resolve_chrome_url(&url).is_err());
} }
#[test] #[test]
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
fn test_absolute_2() { fn test_absolute_2() {
let url = Url::parse("chrome://C:\\Windows").unwrap(); let url = Url::parse("chrome:/C:\\Windows").unwrap();
assert!(resolve_chrome_url(&url).is_err()); assert!(resolve_chrome_url(&url).is_err());
} }
#[test] #[test]
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
fn test_absolute_3() { fn test_absolute_3() {
let url = Url::parse("chrome://\\\\server/C$").unwrap(); let url = Url::parse("chrome:/\\\\server/C$").unwrap();
assert!(resolve_chrome_url(&url).is_err()); assert!(resolve_chrome_url(&url).is_err());
} }
#[test] #[test]
fn test_valid() { fn test_valid() {
let url = Url::parse("chrome://badcert.jpg").unwrap(); let url = Url::parse("chrome:/badcert.jpg").unwrap();
let resolved = resolve_chrome_url(&url).unwrap(); let resolved = resolve_chrome_url(&url).unwrap();
assert_eq!(resolved.scheme, "file"); assert_eq!(resolved.scheme(), "file");
} }

View file

@ -22,7 +22,7 @@ use std::sync::mpsc::{Sender, channel};
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use time::{self, Duration}; use time::{self, Duration};
use unicase::UniCase; use unicase::UniCase;
use url::{Origin as UrlOrigin, OpaqueOrigin, Url}; use url::{Origin as UrlOrigin, Url};
// TODO write a struct that impls Handler for storing test values // TODO write a struct that impls Handler for storing test values
@ -156,7 +156,7 @@ fn test_cors_preflight_fetch() {
}; };
let (mut server, url) = make_server(handler); let (mut server, url) = make_server(handler);
let origin = Origin::Origin(UrlOrigin::UID(OpaqueOrigin::new())); let origin = Origin::Origin(UrlOrigin::new_opaque());
let mut request = Request::new(url, Some(origin), false); let mut request = Request::new(url, Some(origin), false);
request.referer = Referer::NoReferer; request.referer = Referer::NoReferer;
request.use_cors_preflight = true; request.use_cors_preflight = true;
@ -192,7 +192,7 @@ fn test_cors_preflight_fetch_network_error() {
}; };
let (mut server, url) = make_server(handler); let (mut server, url) = make_server(handler);
let origin = Origin::Origin(UrlOrigin::UID(OpaqueOrigin::new())); let origin = Origin::Origin(UrlOrigin::new_opaque());
let mut request = Request::new(url, Some(origin), false); let mut request = Request::new(url, Some(origin), false);
*request.method.borrow_mut() = Method::Extension("CHICKEN".to_owned()); *request.method.borrow_mut() = Method::Extension("CHICKEN".to_owned());
request.referer = Referer::NoReferer; request.referer = Referer::NoReferer;
@ -269,7 +269,7 @@ fn test_fetch_response_is_cors_filtered() {
let (mut server, url) = make_server(handler); let (mut server, url) = make_server(handler);
// an origin mis-match will stop it from defaulting to a basic filtered response // an origin mis-match will stop it from defaulting to a basic filtered response
let origin = Origin::Origin(UrlOrigin::UID(OpaqueOrigin::new())); let origin = Origin::Origin(UrlOrigin::new_opaque());
let mut request = Request::new(url, Some(origin), false); let mut request = Request::new(url, Some(origin), false);
request.referer = Referer::NoReferer; request.referer = Referer::NoReferer;
request.mode = RequestMode::CORSMode; request.mode = RequestMode::CORSMode;
@ -304,7 +304,7 @@ fn test_fetch_response_is_opaque_filtered() {
let (mut server, url) = make_server(handler); let (mut server, url) = make_server(handler);
// an origin mis-match will fall through to an Opaque filtered response // an origin mis-match will fall through to an Opaque filtered response
let origin = Origin::Origin(UrlOrigin::UID(OpaqueOrigin::new())); let origin = Origin::Origin(UrlOrigin::new_opaque());
let mut request = Request::new(url, Some(origin), false); let mut request = Request::new(url, Some(origin), false);
request.referer = Referer::NoReferer; request.referer = Referer::NoReferer;
let wrapped_request = Rc::new(request); let wrapped_request = Rc::new(request);
@ -340,7 +340,7 @@ fn test_fetch_response_is_opaque_redirect_filtered() {
RequestUri::AbsolutePath(url) => RequestUri::AbsolutePath(url) =>
url.split("/").collect::<String>().parse::<u32>().unwrap_or(0), url.split("/").collect::<String>().parse::<u32>().unwrap_or(0),
RequestUri::AbsoluteUri(url) => RequestUri::AbsoluteUri(url) =>
url.path().unwrap().last().unwrap().split("/").collect::<String>().parse::<u32>().unwrap_or(0), url.path_segments().unwrap().next_back().unwrap().parse::<u32>().unwrap_or(0),
_ => panic!() _ => panic!()
}; };
@ -420,7 +420,7 @@ fn setup_server_and_fetch(message: &'static [u8], redirect_cap: u32) -> Response
RequestUri::AbsolutePath(url) => RequestUri::AbsolutePath(url) =>
url.split("/").collect::<String>().parse::<u32>().unwrap_or(0), url.split("/").collect::<String>().parse::<u32>().unwrap_or(0),
RequestUri::AbsoluteUri(url) => RequestUri::AbsoluteUri(url) =>
url.path().unwrap().last().unwrap().split("/").collect::<String>().parse::<u32>().unwrap_or(0), url.path_segments().unwrap().next_back().unwrap().parse::<u32>().unwrap_or(0),
_ => panic!() _ => panic!()
}; };
@ -493,7 +493,7 @@ fn test_fetch_redirect_updates_method_runner(tx: Sender<bool>, status_code: Stat
RequestUri::AbsolutePath(url) => RequestUri::AbsolutePath(url) =>
url.split("/").collect::<String>().parse::<u32>().unwrap_or(0), url.split("/").collect::<String>().parse::<u32>().unwrap_or(0),
RequestUri::AbsoluteUri(url) => RequestUri::AbsoluteUri(url) =>
url.path().unwrap().last().unwrap().split("/").collect::<String>().parse::<u32>().unwrap_or(0), url.path_segments().unwrap().next_back().unwrap().parse::<u32>().unwrap_or(0),
_ => panic!() _ => panic!()
}; };
@ -631,7 +631,7 @@ fn test_opaque_filtered_fetch_async_returns_complete_response() {
let (mut server, url) = make_server(handler); let (mut server, url) = make_server(handler);
// an origin mis-match will fall through to an Opaque filtered response // an origin mis-match will fall through to an Opaque filtered response
let origin = Origin::Origin(UrlOrigin::UID(OpaqueOrigin::new())); let origin = Origin::Origin(UrlOrigin::new_opaque());
let mut request = Request::new(url, Some(origin), false); let mut request = Request::new(url, Some(origin), false);
request.referer = Referer::NoReferer; request.referer = Referer::NoReferer;
@ -658,7 +658,7 @@ fn test_opaque_redirect_filtered_fetch_async_returns_complete_response() {
RequestUri::AbsolutePath(url) => RequestUri::AbsolutePath(url) =>
url.split("/").collect::<String>().parse::<u32>().unwrap_or(0), url.split("/").collect::<String>().parse::<u32>().unwrap_or(0),
RequestUri::AbsoluteUri(url) => RequestUri::AbsoluteUri(url) =>
url.path().unwrap().last().unwrap().split("/").collect::<String>().parse::<u32>().unwrap_or(0), url.path_segments().unwrap().last().unwrap().parse::<u32>().unwrap_or(0),
_ => panic!() _ => panic!()
}; };

View file

@ -267,7 +267,7 @@ fn test_secure_url_does_not_affect_non_http_schemas() {
let url = Url::parse("file://mozilla.org").unwrap(); let url = Url::parse("file://mozilla.org").unwrap();
let secure = secure_url(&url); let secure = secure_url(&url);
assert_eq!(&secure.scheme, "file"); assert_eq!(secure.scheme(), "file");
} }
#[test] #[test]
@ -275,5 +275,5 @@ fn test_secure_url_forces_an_http_host_in_list_to_https() {
let url = Url::parse("http://mozilla.org").unwrap(); let url = Url::parse("http://mozilla.org").unwrap();
let secure = secure_url(&url); let secure = secure_url(&url);
assert_eq!(&secure.scheme, "https"); assert_eq!(secure.scheme(), "https");
} }

View file

@ -1091,7 +1091,7 @@ fn test_load_errors_when_there_is_too_many_redirects() {
fn create(&self, url: Url, _: Method, _: Headers) -> Result<MockRequest, LoadError> { fn create(&self, url: Url, _: Method, _: Headers) -> Result<MockRequest, LoadError> {
if url.domain().unwrap() == "mozilla.com" { if url.domain().unwrap() == "mozilla.com" {
Ok(MockRequest::new(ResponseType::Redirect(format!("{}/1", url.serialize())))) Ok(MockRequest::new(ResponseType::Redirect(format!("{}/1", url))))
} else { } else {
panic!("unexpected host {:?}", url) panic!("unexpected host {:?}", url)
} }
@ -1334,13 +1334,13 @@ fn test_redirect_from_x_to_x_provides_x_with_cookie_from_first_response() {
type R = MockRequest; type R = MockRequest;
fn create(&self, url: Url, _: Method, headers: Headers) -> Result<MockRequest, LoadError> { fn create(&self, url: Url, _: Method, headers: Headers) -> Result<MockRequest, LoadError> {
if url.path().unwrap()[0] == "initial" { if url.path_segments().unwrap().next().unwrap() == "initial" {
let mut initial_answer_headers = Headers::new(); let mut initial_answer_headers = Headers::new();
initial_answer_headers.set_raw("set-cookie", vec![b"mozillaIs=theBest; path=/;".to_vec()]); initial_answer_headers.set_raw("set-cookie", vec![b"mozillaIs=theBest; path=/;".to_vec()]);
Ok(MockRequest::new( Ok(MockRequest::new(
ResponseType::RedirectWithHeaders("http://mozilla.org/subsequent/".to_owned(), ResponseType::RedirectWithHeaders("http://mozilla.org/subsequent/".to_owned(),
initial_answer_headers))) initial_answer_headers)))
} else if url.path().unwrap()[0] == "subsequent" { } else if url.path_segments().unwrap().next().unwrap() == "subsequent" {
let mut expected_subsequent_headers = Headers::new(); let mut expected_subsequent_headers = Headers::new();
expected_subsequent_headers.set_raw("Cookie", vec![b"mozillaIs=theBest".to_vec()]); expected_subsequent_headers.set_raw("Cookie", vec![b"mozillaIs=theBest".to_vec()]);
assert_headers_included(&expected_subsequent_headers, &headers); assert_headers_included(&expected_subsequent_headers, &headers);

View file

@ -8,9 +8,14 @@ use net_traits::hosts::{parse_hostsfile, host_replacement};
use net_traits::{ControlMsg, LoadData, LoadConsumer, LoadContext, NetworkError, ProgressMsg}; use net_traits::{ControlMsg, LoadData, LoadConsumer, LoadContext, NetworkError, ProgressMsg};
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::collections::HashMap; use std::collections::HashMap;
use std::net::IpAddr;
use std::sync::mpsc::channel; use std::sync::mpsc::channel;
use url::Url; use url::Url;
fn ip(s: &str) -> IpAddr {
s.parse().unwrap()
}
#[test] #[test]
fn test_exit() { fn test_exit() {
let resource_thread = new_resource_thread("".to_owned(), None); let resource_thread = new_resource_thread("".to_owned(), None);
@ -37,8 +42,8 @@ fn test_parse_hostsfile() {
let mock_hosts_file_content = "127.0.0.1 foo.bar.com\n127.0.0.2 servo.test.server"; let mock_hosts_file_content = "127.0.0.1 foo.bar.com\n127.0.0.2 servo.test.server";
let hosts_table = parse_hostsfile(mock_hosts_file_content); let hosts_table = parse_hostsfile(mock_hosts_file_content);
assert_eq!(2, hosts_table.len()); assert_eq!(2, hosts_table.len());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"foo.bar.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("foo.bar.com").unwrap());
assert_eq!("127.0.0.2".to_owned(), *hosts_table.get(&"servo.test.server".to_owned()).unwrap()); assert_eq!(ip("127.0.0.2"), *hosts_table.get("servo.test.server").unwrap());
} }
#[test] #[test]
@ -46,7 +51,7 @@ fn test_parse_malformed_hostsfile() {
let mock_hosts_file_content = "malformed file\n127.0.0.1 foo.bar.com\nservo.test.server 127.0.0.1"; let mock_hosts_file_content = "malformed file\n127.0.0.1 foo.bar.com\nservo.test.server 127.0.0.1";
let hosts_table = parse_hostsfile(mock_hosts_file_content); let hosts_table = parse_hostsfile(mock_hosts_file_content);
assert_eq!(1, hosts_table.len()); assert_eq!(1, hosts_table.len());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"foo.bar.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("foo.bar.com").unwrap());
} }
#[test] #[test]
@ -54,7 +59,7 @@ fn test_parse_hostsfile_with_line_comment() {
let mock_hosts_file_content = "# this is a line comment\n127.0.0.1 foo.bar.com\n# anothercomment"; let mock_hosts_file_content = "# this is a line comment\n127.0.0.1 foo.bar.com\n# anothercomment";
let hosts_table = parse_hostsfile(mock_hosts_file_content); let hosts_table = parse_hostsfile(mock_hosts_file_content);
assert_eq!(1, hosts_table.len()); assert_eq!(1, hosts_table.len());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"foo.bar.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("foo.bar.com").unwrap());
} }
#[test] #[test]
@ -62,8 +67,8 @@ fn test_parse_hostsfile_with_end_of_line_comment() {
let mock_hosts_file_content = "127.0.0.1 foo.bar.com # line ending comment\n127.0.0.2 servo.test.server #comment"; let mock_hosts_file_content = "127.0.0.1 foo.bar.com # line ending comment\n127.0.0.2 servo.test.server #comment";
let hosts_table = parse_hostsfile(mock_hosts_file_content); let hosts_table = parse_hostsfile(mock_hosts_file_content);
assert_eq!(2, hosts_table.len()); assert_eq!(2, hosts_table.len());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"foo.bar.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("foo.bar.com").unwrap());
assert_eq!("127.0.0.2".to_owned(), *hosts_table.get(&"servo.test.server".to_owned()).unwrap()); assert_eq!(ip("127.0.0.2"), *hosts_table.get("servo.test.server").unwrap());
} }
#[test] #[test]
@ -71,8 +76,8 @@ fn test_parse_hostsfile_with_2_hostnames_for_1_address() {
let mock_hosts_file_content = "127.0.0.1 foo.bar.com baz.bar.com"; let mock_hosts_file_content = "127.0.0.1 foo.bar.com baz.bar.com";
let hosts_table = parse_hostsfile(mock_hosts_file_content); let hosts_table = parse_hostsfile(mock_hosts_file_content);
assert_eq!(2, hosts_table.len()); assert_eq!(2, hosts_table.len());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"foo.bar.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("foo.bar.com").unwrap());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"baz.bar.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("baz.bar.com").unwrap());
} }
#[test] #[test]
@ -80,10 +85,10 @@ fn test_parse_hostsfile_with_4_hostnames_for_1_address() {
let mock_hosts_file_content = "127.0.0.1 moz.foo.com moz.bar.com moz.baz.com moz.moz.com"; let mock_hosts_file_content = "127.0.0.1 moz.foo.com moz.bar.com moz.baz.com moz.moz.com";
let hosts_table = parse_hostsfile(mock_hosts_file_content); let hosts_table = parse_hostsfile(mock_hosts_file_content);
assert_eq!(4, hosts_table.len()); assert_eq!(4, hosts_table.len());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"moz.foo.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("moz.foo.com").unwrap());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"moz.bar.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("moz.bar.com").unwrap());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"moz.baz.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("moz.baz.com").unwrap());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"moz.moz.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("moz.moz.com").unwrap());
} }
#[test] #[test]
@ -91,8 +96,8 @@ fn test_parse_hostsfile_with_tabs_instead_spaces() {
let mock_hosts_file_content = "127.0.0.1\tfoo.bar.com\n127.0.0.2\tservo.test.server"; let mock_hosts_file_content = "127.0.0.1\tfoo.bar.com\n127.0.0.2\tservo.test.server";
let hosts_table = parse_hostsfile(mock_hosts_file_content); let hosts_table = parse_hostsfile(mock_hosts_file_content);
assert_eq!(2, hosts_table.len()); assert_eq!(2, hosts_table.len());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"foo.bar.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("foo.bar.com").unwrap());
assert_eq!("127.0.0.2".to_owned(), *hosts_table.get(&"servo.test.server".to_owned()).unwrap()); assert_eq!(ip("127.0.0.2"), *hosts_table.get("servo.test.server").unwrap());
} }
#[test] #[test]
@ -145,25 +150,25 @@ fn test_parse_hostsfile_with_end_of_line_whitespace()
127.0.0.2 servo.test.server "; 127.0.0.2 servo.test.server ";
let hosts_table = parse_hostsfile(mock_hosts_file_content); let hosts_table = parse_hostsfile(mock_hosts_file_content);
assert_eq!(3, hosts_table.len()); assert_eq!(3, hosts_table.len());
assert_eq!("127.0.0.1".to_owned(), *hosts_table.get(&"foo.bar.com".to_owned()).unwrap()); assert_eq!(ip("127.0.0.1"), *hosts_table.get("foo.bar.com").unwrap());
assert_eq!("2001:db8:0:0:0:ff00:42:8329".to_owned(), *hosts_table.get(&"moz.foo.com".to_owned()).unwrap()); assert_eq!(ip("2001:db8:0:0:0:ff00:42:8329"), *hosts_table.get("moz.foo.com").unwrap());
assert_eq!("127.0.0.2".to_owned(), *hosts_table.get(&"servo.test.server".to_owned()).unwrap()); assert_eq!(ip("127.0.0.2"), *hosts_table.get("servo.test.server").unwrap());
} }
#[test] #[test]
fn test_replace_hosts() { fn test_replace_hosts() {
let mut host_table = HashMap::new(); let mut host_table = HashMap::new();
host_table.insert("foo.bar.com".to_owned(), "127.0.0.1".to_owned()); host_table.insert("foo.bar.com".to_owned(), ip("127.0.0.1"));
host_table.insert("servo.test.server".to_owned(), "127.0.0.2".to_owned()); host_table.insert("servo.test.server".to_owned(), ip("127.0.0.2"));
let url = Url::parse("http://foo.bar.com:8000/foo").unwrap(); let url = Url::parse("http://foo.bar.com:8000/foo").unwrap();
assert_eq!(host_replacement(&host_table, &url).domain().unwrap(), "127.0.0.1"); assert_eq!(host_replacement(&host_table, &url).host_str().unwrap(), "127.0.0.1");
let url = Url::parse("http://servo.test.server").unwrap(); let url = Url::parse("http://servo.test.server").unwrap();
assert_eq!(host_replacement(&host_table, &url).domain().unwrap(), "127.0.0.2"); assert_eq!(host_replacement(&host_table, &url).host_str().unwrap(), "127.0.0.2");
let url = Url::parse("http://a.foo.bar.com").unwrap(); let url = Url::parse("http://a.foo.bar.com").unwrap();
assert_eq!(host_replacement(&host_table, &url).domain().unwrap(), "a.foo.bar.com"); assert_eq!(host_replacement(&host_table, &url).host_str().unwrap(), "a.foo.bar.com");
} }
#[test] #[test]

View file

@ -21,4 +21,4 @@ path = "../../../components/script"
path = "../../../components/util" path = "../../../components/util"
[dependencies] [dependencies]
url = {version = "0.5.8", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -29,4 +29,4 @@ cssparser = {version = "0.5.4", features = ["heap_size"]}
euclid = {version = "0.6.4", features = ["plugins"]} euclid = {version = "0.6.4", features = ["plugins"]}
selectors = {version = "0.5", features = ["heap_size"]} selectors = {version = "0.5", features = ["heap_size"]}
string_cache = {version = "0.2.12", features = ["heap_size"]} string_cache = {version = "0.2.12", features = ["heap_size"]}
url = {version = "0.5.7", features = ["heap_size"]} url = {version = "1.0.0", features = ["heap_size"]}

View file

@ -17,11 +17,11 @@ fn test_argument_parsing() {
assert!(parse_url_or_filename(fake_cwd, "http://example.net:invalid").is_err()); assert!(parse_url_or_filename(fake_cwd, "http://example.net:invalid").is_err());
let url = parse_url_or_filename(fake_cwd, "http://example.net").unwrap(); let url = parse_url_or_filename(fake_cwd, "http://example.net").unwrap();
assert_eq!(url.scheme, "http"); assert_eq!(url.scheme(), "http");
let url = parse_url_or_filename(fake_cwd, "file:///foo/bar.html").unwrap(); let url = parse_url_or_filename(fake_cwd, "file:///foo/bar.html").unwrap();
assert_eq!(url.scheme, "file"); assert_eq!(url.scheme(), "file");
assert_eq!(url.path().unwrap(), ["foo", "bar.html"]); assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["foo", "bar.html"]);
} }
#[test] #[test]
@ -30,8 +30,8 @@ fn test_file_path_parsing() {
let fake_cwd = Path::new(FAKE_CWD); let fake_cwd = Path::new(FAKE_CWD);
let url = parse_url_or_filename(fake_cwd, "bar.html").unwrap(); let url = parse_url_or_filename(fake_cwd, "bar.html").unwrap();
assert_eq!(url.scheme, "file"); assert_eq!(url.scheme(), "file");
assert_eq!(url.path().unwrap(), ["fake", "cwd", "bar.html"]); assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["fake", "cwd", "bar.html"]);
} }
#[test] #[test]
@ -40,8 +40,8 @@ fn test_file_path_parsing() {
let fake_cwd = Path::new(FAKE_CWD); let fake_cwd = Path::new(FAKE_CWD);
let url = parse_url_or_filename(fake_cwd, "bar.html").unwrap(); let url = parse_url_or_filename(fake_cwd, "bar.html").unwrap();
assert_eq!(url.scheme, "file"); assert_eq!(url.scheme(), "file");
assert_eq!(url.path().unwrap(), ["C:", "fake", "cwd", "bar.html"]); assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["C:", "fake", "cwd", "bar.html"]);
} }
#[test] #[test]
@ -53,16 +53,17 @@ fn test_argument_parsing_special() {
// '?' and '#' have a special meaning in URLs... // '?' and '#' have a special meaning in URLs...
let url = parse_url_or_filename(fake_cwd, "file:///foo/bar?baz#buzz.html").unwrap(); let url = parse_url_or_filename(fake_cwd, "file:///foo/bar?baz#buzz.html").unwrap();
assert_eq!(&*url.to_file_path().unwrap(), Path::new("/foo/bar")); assert_eq!(&*url.to_file_path().unwrap(), Path::new("/foo/bar"));
assert_eq!(url.scheme, "file"); assert_eq!(url.scheme(), "file");
assert_eq!(url.path().unwrap(), ["foo", "bar"]); assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(), ["foo", "bar"]);
assert_eq!(url.query.unwrap(), "baz"); assert_eq!(url.query(), Some("baz"));
assert_eq!(url.fragment.unwrap(), "buzz.html"); assert_eq!(url.fragment(), Some("buzz.html"));
// but not in file names. // but not in file names.
let url = parse_url_or_filename(fake_cwd, "./bar?baz#buzz.html").unwrap(); let url = parse_url_or_filename(fake_cwd, "./bar?baz#buzz.html").unwrap();
assert_eq!(&*url.to_file_path().unwrap(), Path::new("/fake/cwd/bar?baz#buzz.html")); assert_eq!(&*url.to_file_path().unwrap(), Path::new("/fake/cwd/bar?baz#buzz.html"));
assert_eq!(url.scheme, "file"); assert_eq!(url.scheme(), "file");
assert_eq!(url.path().unwrap(), ["fake", "cwd", "bar%3Fbaz%23buzz.html"]); assert_eq!(url.path_segments().unwrap().collect::<Vec<_>>(),
assert!(url.query.is_none()); ["fake", "cwd", "bar%3Fbaz%23buzz.html"]);
assert!(url.fragment.is_none()); assert_eq!(url.query(), None);
assert_eq!(url.fragment(), None);
} }

View file

@ -1,29 +1,5 @@
[url-constructor.html] [url-constructor.html]
type: testharness type: testharness
[Parsing: <#β> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <http://www.google.com/foo?bar=baz# »> against <about:blank>]
expected: FAIL
[Parsing: <data:test# »> against <about:blank>]
expected: FAIL
[Parsing: <http://你好你好> against <http://other.com/>]
expected: FAIL
[Parsing: <foo://> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <foo://///////> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <foo://///////bar.com/> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <foo:////://///> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <file:/example.com/> against <http://example.org/foo/bar>] [Parsing: <file:/example.com/> against <http://example.org/foo/bar>]
expected: FAIL expected: FAIL
@ -63,99 +39,9 @@
[Parsing: <file:test> against <file:///tmp/mock/path>] [Parsing: <file:test> against <file:///tmp/mock/path>]
expected: FAIL expected: FAIL
[Parsing: <httpa://foo:80/> against <about:blank>]
expected: FAIL
[Parsing: <file:/example.com/> against <about:blank>] [Parsing: <file:/example.com/> against <about:blank>]
expected: FAIL expected: FAIL
[Parsing: <#> against <test:test>]
expected: FAIL
[Parsing: <#x> against <mailto:x@x.com>]
expected: FAIL
[Parsing: <#x> against <data:,>]
expected: FAIL
[Parsing: <#x> against <about:blank>]
expected: FAIL
[Parsing: <#> against <test:test?test>]
expected: FAIL
[Parsing: <i> against <sc:/pa/pa>]
expected: FAIL
[Parsing: <i> against <sc://ho/pa>]
expected: FAIL
[Parsing: <i> against <sc:///pa/pa>]
expected: FAIL
[Parsing: <../i> against <sc:/pa/pa>]
expected: FAIL
[Parsing: <../i> against <sc://ho/pa>]
expected: FAIL
[Parsing: <../i> against <sc:///pa/pa>]
expected: FAIL
[Parsing: </i> against <sc:/pa/pa>]
expected: FAIL
[Parsing: </i> against <sc://ho/pa>]
expected: FAIL
[Parsing: </i> against <sc:///pa/pa>]
expected: FAIL
[Parsing: <?i> against <sc:/pa/pa>]
expected: FAIL
[Parsing: <?i> against <sc://ho/pa>]
expected: FAIL
[Parsing: <?i> against <sc:///pa/pa>]
expected: FAIL
[Parsing: <#i> against <sc:sd>]
expected: FAIL
[Parsing: <#i> against <sc:sd/sd>]
expected: FAIL
[Parsing: <#i> against <sc:/pa/pa>]
expected: FAIL
[Parsing: <#i> against <sc://ho/pa>]
expected: FAIL
[Parsing: <#i> against <sc:///pa/pa>]
expected: FAIL
[Parsing: <about:/../> against <about:blank>]
expected: FAIL
[Parsing: <data:/../> against <about:blank>]
expected: FAIL
[Parsing: <javascript:/../> against <about:blank>]
expected: FAIL
[Parsing: <mailto:/../> against <about:blank>]
expected: FAIL
[Parsing: <sc://ñ.test/> against <about:blank>]
expected: FAIL
[Parsing: <http://&a:foo(b\]c@d:2/> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <http://::@c@d:2> against <http://example.org/foo/bar>]
expected: FAIL
[Parsing: <//server/file> against <file:///tmp/mock/path>] [Parsing: <//server/file> against <file:///tmp/mock/path>]
expected: FAIL expected: FAIL
@ -186,15 +72,6 @@
[Parsing: <file:a> against <http://www.example.com/test>] [Parsing: <file:a> against <http://www.example.com/test>]
expected: FAIL expected: FAIL
[Parsing: <http://example.com/foo/%2e%2> against <about:blank>]
expected: FAIL
[Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank>]
expected: FAIL
[Parsing: <http://www/foo%2Ehtml> against <about:blank>]
expected: FAIL
[Parsing: <h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg> against <about:blank>] [Parsing: <h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg> against <about:blank>]
expected: FAIL expected: FAIL

View file

@ -1,5 +0,0 @@
[018.html]
type: testharness
[WebSockets: NULL char in url]
expected: FAIL