[Pkg-javascript-commits] [node-stream-http] 70/208: Make `withCredentials` default to false
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 13 13:39:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stream-http.
commit 9059849673b260f5b1197ecf9fe68edbd0cc8df1
Author: John Hiesey <john at hiesey.com>
Date: Mon Jul 20 16:01:10 2015 -0700
Make `withCredentials` default to false
This may break compatibility with code that was written for
`http-browserify`. Fixes #7
---
index.js | 3 ---
test/node/http-browserify.js | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/index.js b/index.js
index 3aa8d7f..fc6cd26 100644
--- a/index.js
+++ b/index.js
@@ -25,9 +25,6 @@ http.request = function (opts, cb) {
opts.hostname = opts.hostname || hostHostname || window.location.hostname
opts.port = opts.port || hostPort || defaultPort
- if (opts.withCredentials === undefined)
- opts.withCredentials = true
-
// Also valid opts.auth, opts.mode
var req = new ClientRequest(opts)
diff --git a/test/node/http-browserify.js b/test/node/http-browserify.js
index 670e677..81f6ebd 100644
--- a/test/node/http-browserify.js
+++ b/test/node/http-browserify.js
@@ -85,7 +85,7 @@ test('Test withCredentials param', function(t) {
t.equal( request._xhr.withCredentials, true, 'xhr.withCredentials should be true')
var request = http.get({ url: url }, noop)
- t.equal( request._xhr.withCredentials, true, 'xhr.withCredentials should be true')
+ t.equal( request._xhr.withCredentials, false, 'xhr.withCredentials should be false')
t.end()
})
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git
More information about the Pkg-javascript-commits
mailing list