mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
implement support for withCredentials
This commit is contained in:
parent
2cfcc26d9e
commit
ce3c9ff57c
4 changed files with 21 additions and 6 deletions
|
@ -516,6 +516,9 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
let global = self.global.root();
|
||||
let pipeline_id = global.r().pipeline();
|
||||
let mut load_data = LoadData::new(self.request_url.borrow().clone().unwrap(), Some(pipeline_id));
|
||||
if load_data.url.origin().ne(&global.r().get_url().origin()) {
|
||||
load_data.credentials_flag = self.WithCredentials();
|
||||
}
|
||||
load_data.data = extracted;
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -1987,6 +1987,7 @@ impl ScriptTask {
|
|||
data: load_data.data,
|
||||
cors: None,
|
||||
pipeline_id: Some(id),
|
||||
credentials_flag: true,
|
||||
}, LoadConsumer::Listener(response_target), None)).unwrap();
|
||||
|
||||
self.incomplete_loads.borrow_mut().push(incomplete);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue