Use Url.join instead of UrlParser.base_url(...).parse (#9002)

This commit is contained in:
Mathieu Agopian 2015-12-18 17:02:41 +01:00
parent 6764cf0ee9
commit 11234f5370
41 changed files with 58 additions and 64 deletions

View file

@ -37,7 +37,7 @@ use std::error::Error;
use std::io::{self, Read, Write};
use std::sync::mpsc::Sender;
use std::sync::{Arc, RwLock};
use url::{Url, UrlParser};
use url::Url;
use util::resource_files::resources_dir_path;
use util::task::spawn_named;
use uuid;
@ -700,7 +700,7 @@ pub fn load<A>(load_data: LoadData,
}
}
let new_doc_url = match UrlParser::new().base_url(&doc_url).parse(&new_url) {
let new_doc_url = match doc_url.join(&new_url) {
Ok(u) => u,
Err(e) => {
return Err(LoadError::InvalidRedirect(doc_url, e.to_string()));