mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Review fixes
This commit is contained in:
parent
8b9479f8bf
commit
9deecd793c
11 changed files with 44 additions and 549 deletions
|
@ -117,7 +117,7 @@ pub struct RequestInit {
|
|||
pub unsafe_request: bool,
|
||||
pub same_origin_data: bool,
|
||||
pub body: Option<Vec<u8>>,
|
||||
// TODO: cleint object
|
||||
// TODO: client object
|
||||
pub destination: Destination,
|
||||
pub synchronous: bool,
|
||||
pub mode: RequestMode,
|
||||
|
@ -214,7 +214,9 @@ impl Request {
|
|||
}
|
||||
|
||||
pub fn from_init(init: RequestInit) -> Request {
|
||||
let mut req = Request::new(init.url, None, false);
|
||||
let mut req = Request::new(init.url,
|
||||
Some(Origin::Origin(init.origin.origin())),
|
||||
false);
|
||||
*req.method.borrow_mut() = init.method;
|
||||
*req.headers.borrow_mut() = init.headers;
|
||||
req.unsafe_request = init.unsafe_request;
|
||||
|
@ -226,7 +228,6 @@ impl Request {
|
|||
req.use_cors_preflight = init.use_cors_preflight;
|
||||
req.credentials_mode = init.credentials_mode;
|
||||
req.use_url_credentials = init.use_url_credentials;
|
||||
*req.origin.borrow_mut() = Origin::Origin(init.origin.origin());
|
||||
*req.referer.borrow_mut() = if let Some(url) = init.referer_url {
|
||||
Referer::RefererUrl(url)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue