mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Change RequestInit origin type to ImmutableOrigin
This commit is contained in:
parent
104e0b4730
commit
6032940fb8
32 changed files with 173 additions and 529 deletions
|
@ -158,9 +158,7 @@ pub struct RequestInit {
|
|||
pub use_cors_preflight: bool,
|
||||
pub credentials_mode: CredentialsMode,
|
||||
pub use_url_credentials: bool,
|
||||
// this should actually be set by fetch, but fetch
|
||||
// doesn't have info about the client right now
|
||||
pub origin: ServoUrl,
|
||||
pub origin: ImmutableOrigin,
|
||||
// XXXManishearth these should be part of the client object
|
||||
pub referrer_url: Option<ServoUrl>,
|
||||
pub referrer_policy: Option<ReferrerPolicy>,
|
||||
|
@ -188,7 +186,7 @@ impl Default for RequestInit {
|
|||
use_cors_preflight: false,
|
||||
credentials_mode: CredentialsMode::Omit,
|
||||
use_url_credentials: false,
|
||||
origin: ServoUrl::parse("about:blank").unwrap(),
|
||||
origin: ImmutableOrigin::new_opaque(),
|
||||
referrer_url: None,
|
||||
referrer_policy: None,
|
||||
pipeline_id: None,
|
||||
|
@ -302,7 +300,7 @@ impl Request {
|
|||
|
||||
pub fn from_init(init: RequestInit) -> Request {
|
||||
let mut req = Request::new(init.url.clone(),
|
||||
Some(Origin::Origin(init.origin.origin())),
|
||||
Some(Origin::Origin(init.origin)),
|
||||
init.pipeline_id);
|
||||
req.method = init.method;
|
||||
req.headers = init.headers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue