Auto merge of #8812 - jitendra29:support-withCredentials, r=jdm

M1504: Implement basic support for withCredentials API

The pull request includes the following task:

* Implemented basic network-level support by adding a member to LoadData that is used by http_loader.rs to conditionally exclude cookies from the HTTP request if the flag is false (default true)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8812)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-12-05 05:13:01 +05:30
commit 217a55a785
4 changed files with 21 additions and 6 deletions

View file

@ -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]