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:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user