aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/fetch/request.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/fetch/request.rs')
-rw-r--r--components/net/fetch/request.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/net/fetch/request.rs b/components/net/fetch/request.rs
index 861729f5ebf..99337e5b37c 100644
--- a/components/net/fetch/request.rs
+++ b/components/net/fetch/request.rs
@@ -17,7 +17,7 @@ use std::ascii::AsciiExt;
use std::cell::RefCell;
use std::rc::Rc;
use std::str::FromStr;
-use url::{Url, UrlParser};
+use url::Url;
use util::task::spawn_named;
/// A [request context](https://fetch.spec.whatwg.org/#concept-request-context)
@@ -367,7 +367,7 @@ impl Request {
_ => return Response::network_error(),
};
// Step 5
- let location_url = UrlParser::new().base_url(self.url_list.last().unwrap()).parse(&*location);
+ let location_url = self.url_list.last().unwrap().join(&*location);
// Step 6
let location_url = match location_url {
Ok(ref url) if url.scheme == "data" => { return Response::network_error(); }