mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
parent
61fe737885
commit
a97ba4f57d
7 changed files with 3 additions and 35 deletions
|
@ -57,6 +57,6 @@ pub fn get_blob_origin(url: &ServoUrl) -> FileOrigin {
|
||||||
// NOTE: by default this is "null" (Opaque), which is not ideal
|
// NOTE: by default this is "null" (Opaque), which is not ideal
|
||||||
"file://".to_string()
|
"file://".to_string()
|
||||||
} else {
|
} else {
|
||||||
url.origin().unicode_serialization()
|
url.origin().ascii_serialization()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,7 +340,7 @@ impl FetchResponseListener for EventSourceContext {
|
||||||
None => self.fail_the_connection(),
|
None => self.fail_the_connection(),
|
||||||
Some(ct) => match ct.into_inner().0 {
|
Some(ct) => match ct.into_inner().0 {
|
||||||
Mime(TopLevel::Text, SubLevel::EventStream, _) => {
|
Mime(TopLevel::Text, SubLevel::EventStream, _) => {
|
||||||
self.origin = meta.final_url.origin().unicode_serialization();
|
self.origin = meta.final_url.origin().ascii_serialization();
|
||||||
self.announce_the_connection();
|
self.announce_the_connection();
|
||||||
},
|
},
|
||||||
_ => self.fail_the_connection(),
|
_ => self.fail_the_connection(),
|
||||||
|
|
|
@ -319,7 +319,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
|
||||||
},
|
},
|
||||||
Some(ref url) => {
|
Some(ref url) => {
|
||||||
// Step 3.
|
// Step 3.
|
||||||
url.origin().unicode_serialization()
|
url.origin().ascii_serialization()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,11 +89,6 @@ impl ImmutableOrigin {
|
||||||
pub fn ascii_serialization(&self) -> String {
|
pub fn ascii_serialization(&self) -> String {
|
||||||
self.clone().into_url_origin().ascii_serialization()
|
self.clone().into_url_origin().ascii_serialization()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin>
|
|
||||||
pub fn unicode_serialization(&self) -> String {
|
|
||||||
self.clone().into_url_origin().unicode_serialization()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Opaque identifier for URLs that have file or other schemes
|
/// Opaque identifier for URLs that have file or other schemes
|
||||||
|
|
|
@ -9,12 +9,3 @@
|
||||||
[EventSource: cross-origin No allow-origin should fail]
|
[EventSource: cross-origin No allow-origin should fail]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[EventSource: cross-origin basic use]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[EventSource: cross-origin redirect use]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[EventSource: cross-origin redirect use recon]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,3 @@
|
||||||
[Parsing origin: <https://faß.ExAmPlE/> against <about:blank>]
|
[Parsing origin: <https://faß.ExAmPlE/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing origin: <http://你好你好> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing origin: <ftp://%e2%98%83> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing origin: <https://%e2%98%83> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,3 @@
|
||||||
[Parsing origin: <https://faß.ExAmPlE/> against <about:blank>]
|
[Parsing origin: <https://faß.ExAmPlE/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing origin: <http://你好你好> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing origin: <ftp://%e2%98%83> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing origin: <https://%e2%98%83> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue