2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

Fixing handling of compression errors

This commit is contained in:
Josh
2016-04-20 01:26:45 +02:00
parent 8a60a4eb8b
commit 716e487038
+5
View File
@@ -103,6 +103,11 @@ module.exports = function httpAdapter(resolve, reject, config) {
}
});
stream.on('error', function handleStreamError(err) {
if (aborted) return;
reject(err);
});
stream.on('end', function handleStreamEnd() {
var d = Buffer.concat(responseBuffer);
if (config.responseType !== 'arraybuffer') {