diff --git a/lib/adapters/http.js b/lib/adapters/http.js index e302bc0e46..06169ff2cb 100755 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -188,7 +188,7 @@ module.exports = function httpAdapter(config) { case 'compress': case 'deflate': // add the unzipper to the body stream processing pipeline - stream = stream.pipe(zlib.createUnzip()); + stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip()); // remove the content-encoding in order to not confuse downstream operations delete res.headers['content-encoding'];