mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update to url 2.0
This commit is contained in:
parent
ff3f3d30c7
commit
9392180007
26 changed files with 74 additions and 355 deletions
|
@ -29,13 +29,14 @@ malloc_size_of_derive = "0.1"
|
|||
mime = "0.3"
|
||||
msg = {path = "../msg"}
|
||||
num-traits = "0.2"
|
||||
percent-encoding = "1.0"
|
||||
pixels = {path = "../pixels"}
|
||||
serde = "1.0"
|
||||
servo_arc = {path = "../servo_arc"}
|
||||
servo_config = {path = "../config"}
|
||||
servo_url = {path = "../url"}
|
||||
time = "0.1"
|
||||
url = "1.2"
|
||||
url = "2.0"
|
||||
uuid = {version = "0.7", features = ["v4", "serde"]}
|
||||
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ extern crate malloc_size_of;
|
|||
extern crate malloc_size_of_derive;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate url;
|
||||
|
||||
use crate::filemanager_thread::FileManagerThreadMsg;
|
||||
use crate::request::{Request, RequestBuilder};
|
||||
|
@ -35,7 +33,6 @@ use msg::constellation_msg::HistoryStateId;
|
|||
use servo_url::ServoUrl;
|
||||
use std::error::Error;
|
||||
use time::precise_time_ns;
|
||||
use url::percent_encoding;
|
||||
|
||||
pub mod blob_url_store;
|
||||
pub mod filemanager_thread;
|
||||
|
@ -656,7 +653,7 @@ pub fn trim_http_whitespace(mut slice: &[u8]) -> &[u8] {
|
|||
}
|
||||
|
||||
pub fn http_percent_encode(bytes: &[u8]) -> String {
|
||||
define_encode_set! {
|
||||
percent_encoding::define_encode_set! {
|
||||
// This encode set is used for HTTP header values and is defined at
|
||||
// https://tools.ietf.org/html/rfc5987#section-3.2
|
||||
pub HTTP_VALUE = [percent_encoding::SIMPLE_ENCODE_SET] | {
|
||||
|
@ -665,5 +662,5 @@ pub fn http_percent_encode(bytes: &[u8]) -> String {
|
|||
}
|
||||
}
|
||||
|
||||
url::percent_encoding::percent_encode(bytes, HTTP_VALUE).to_string()
|
||||
percent_encoding::percent_encode(bytes, HTTP_VALUE).to_string()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue