mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use Url.join instead of UrlParser.base_url(...).parse (#9002)
This commit is contained in:
parent
6764cf0ee9
commit
11234f5370
41 changed files with 58 additions and 64 deletions
|
@ -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(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue