Skip to content

Commit

Permalink
No default withCredentials. Updated version of browserify#47
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Farrell committed Jun 23, 2014
1 parent 7dc5009 commit 31e9c86
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 1 addition & 5 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ var Request = module.exports = function (xhr, params) {
+ (params.path || '/')
;

if (typeof params.withCredentials === 'undefined') {
params.withCredentials = true;
}

try { xhr.withCredentials = params.withCredentials }
if (params.withCredentials) try { xhr.withCredentials = params.withCredentials }
catch (e) {}

if (params.responseType) try { xhr.responseType = params.responseType }
Expand Down
3 changes: 0 additions & 3 deletions test/request_url.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,5 @@ test('Test withCredentials param', function(t) {
var request = http.request({ url: url, withCredentials: true }, noop);
t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true');

var request = http.request({ url: url }, noop);
t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true');

t.end();
});

0 comments on commit 31e9c86

Please sign in to comment.