aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xmlhttprequest.rs
diff options
context:
space:
mode:
authorJigesh Mehta <jigesh.1992@gmail.com>2015-12-03 13:32:44 -0500
committerJigesh Mehta <jigesh.1992@gmail.com>2015-12-04 16:34:30 -0500
commitce3c9ff57cfdb2e989fbcded5c039508c1236a13 (patch)
tree940b509424c3e6f88da2eef6a2fed5ddf6ba9ca2 /components/script/dom/xmlhttprequest.rs
parent2cfcc26d9e5cc732a7594f0c0d96d4174c6b0a8a (diff)
downloadservo-ce3c9ff57cfdb2e989fbcded5c039508c1236a13.tar.gz
servo-ce3c9ff57cfdb2e989fbcded5c039508c1236a13.zip
implement support for withCredentials
Diffstat (limited to 'components/script/dom/xmlhttprequest.rs')
-rw-r--r--components/script/dom/xmlhttprequest.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index 24bd012f105..0f93410f0c1 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -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]