Skip to content

Commit

Permalink
Merge branch 'chromakode-fix-credentials-include'
Browse files Browse the repository at this point in the history
  • Loading branch information
dgraham committed May 5, 2015
2 parents 09c316d + 2553aad commit 2276522
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,6 @@

return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest()
if (request.credentials === 'cors') {
xhr.withCredentials = true;
}

function responseURL() {
if ('responseURL' in xhr) {
Expand Down Expand Up @@ -317,6 +314,12 @@

xhr.open(request.method, request.url, true)

// Note: 'cors' credentials value is nonstandard and accepted for
// backwards compatibility with old versions of this polyfill.
if (request.credentials === 'cors' || request.credentials === 'include') {
xhr.withCredentials = true;
}

if ('responseType' in xhr && support.blob) {
xhr.responseType = 'blob'
}
Expand Down

0 comments on commit 2276522

Please sign in to comment.