summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/request.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/request.js')
-rw-r--r--deps/npm/node_modules/request/request.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js
index ff19ca39cf..c93258b3b2 100644
--- a/deps/npm/node_modules/request/request.js
+++ b/deps/npm/node_modules/request/request.js
@@ -11,7 +11,6 @@ var aws2 = require('aws-sign2')
var aws4 = require('aws4')
var httpSignature = require('http-signature')
var mime = require('mime-types')
-var stringstream = require('stringstream')
var caseless = require('caseless')
var ForeverAgent = require('forever-agent')
var FormData = require('form-data')
@@ -1049,13 +1048,8 @@ Request.prototype.onRequestResponse = function (response) {
if (self.encoding) {
if (self.dests.length !== 0) {
console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.')
- } else if (responseContent.setEncoding) {
- responseContent.setEncoding(self.encoding)
} else {
- // Should only occur on node pre-v0.9.4 (joyent/node@9b5abe5) with
- // zlib streams.
- // If/When support for 0.9.4 is dropped, this should be unnecessary.
- responseContent = responseContent.pipe(stringstream(self.encoding))
+ responseContent.setEncoding(self.encoding)
}
}