diff --git a/main.js b/main.js index a27cf8fa7..e9ac37d50 100644 --- a/main.js +++ b/main.js @@ -319,7 +319,7 @@ 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.") + 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']) @@ -749,6 +749,7 @@ Request.prototype.oauth = function (_oauth) { // skip } else { delete oa['oauth_'+i] + delete oa[i] } } this.headers.Authorization =