mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +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() {
|
stream.on('end', function handleStreamEnd() {
|
||||||
var d = Buffer.concat(responseBuffer);
|
var d = Buffer.concat(responseBuffer);
|
||||||
if (config.responseType !== 'arraybuffer') {
|
if (config.responseType !== 'arraybuffer') {
|
||||||
|
|||||||
Reference in New Issue
Block a user