From 23ae7d576cc63d645eecf057112b71d6cb73e7b1 Mon Sep 17 00:00:00 2001 From: Justin Plock Date: Fri, 6 Jul 2012 23:47:50 -0300 Subject: [PATCH 1/3] Remove non-"oauth_" parameters from being added into the OAuth Authorization header --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index 2407a9349..a4b527524 100644 --- a/main.js +++ b/main.js @@ -747,6 +747,7 @@ Request.prototype.oauth = function (_oauth) { // skip } else { delete oa['oauth_'+i] + delete oa[i] } } this.headers.Authorization = From 8b82ef4ff0b50b0c8dcfb830f62466fa30662666 Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Sun, 8 Jul 2012 18:55:13 -0700 Subject: [PATCH 2/3] Removing guard, there are some cases where this is valid. --- main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/main.js b/main.js index 2407a9349..fd91a53db 100644 --- a/main.js +++ b/main.js @@ -319,7 +319,6 @@ Request.prototype.init = function (options) { } self.once('pipe', function (src) { - if (self.ntick) throw new Error("You cannot pipe to this stream after the first nextTick() after creation of the request stream.") self.src = src if (isReadStream(src)) { if (!self.headers['content-type'] && !self.headers['Content-Type']) From 82440f76f22a5fca856735af66e2dc3fcf240c0d Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Sun, 8 Jul 2012 18:57:52 -0700 Subject: [PATCH 3/3] Adding back in guard for _started, need to keep some measure of safety but we should defer this restriction for as long as possible. --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index fd91a53db..fdb9d443e 100644 --- a/main.js +++ b/main.js @@ -319,6 +319,7 @@ Request.prototype.init = function (options) { } self.once('pipe', function (src) { + if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") self.src = src if (isReadStream(src)) { if (!self.headers['content-type'] && !self.headers['Content-Type'])