mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add ImmutableOrigin to allow for serializing origins
This commit is contained in:
parent
4f7e422054
commit
bfd7b950ad
21 changed files with 270 additions and 152 deletions
|
@ -6,10 +6,9 @@ use ReferrerPolicy;
|
|||
use hyper::header::Headers;
|
||||
use hyper::method::Method;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use servo_url::ServoUrl;
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::default::Default;
|
||||
use url::Origin as UrlOrigin;
|
||||
|
||||
/// An [initiator](https://fetch.spec.whatwg.org/#concept-request-initiator)
|
||||
#[derive(Copy, Clone, PartialEq, HeapSizeOf)]
|
||||
|
@ -55,10 +54,10 @@ pub enum Destination {
|
|||
}
|
||||
|
||||
/// A request [origin](https://fetch.spec.whatwg.org/#concept-request-origin)
|
||||
#[derive(Clone, PartialEq, Debug, HeapSizeOf)]
|
||||
#[derive(Clone, PartialEq, Debug, Serialize, Deserialize, HeapSizeOf)]
|
||||
pub enum Origin {
|
||||
Client,
|
||||
Origin(UrlOrigin),
|
||||
Origin(ImmutableOrigin),
|
||||
}
|
||||
|
||||
/// A [referer](https://fetch.spec.whatwg.org/#concept-request-referrer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue