diff options
author | Fausto Núñez Alberro <fausto.nunez@outlook.com> | 2017-04-26 01:07:31 +0200 |
---|---|---|
committer | Fausto Núñez Alberro <fausto.nunez@mailbox.org> | 2017-07-16 21:44:33 +0200 |
commit | 6032940fb8723d36c6f5089593d0a57f6a7efc93 (patch) | |
tree | c35b06e617fe52d76b07fd99c06765c688e82637 /components/net_traits/request.rs | |
parent | 104e0b473073340689b4bca5c128c61632d4e58d (diff) | |
download | servo-6032940fb8723d36c6f5089593d0a57f6a7efc93.tar.gz servo-6032940fb8723d36c6f5089593d0a57f6a7efc93.zip |
Change RequestInit origin type to ImmutableOrigin
Diffstat (limited to 'components/net_traits/request.rs')
-rw-r--r-- | components/net_traits/request.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/net_traits/request.rs b/components/net_traits/request.rs index bc035ec5c3e..6946cdbef0f 100644 --- a/components/net_traits/request.rs +++ b/components/net_traits/request.rs @@ -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; |