mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
committed by
Emily Morehouse
parent
047501f708
commit
0d4fca085b
@@ -216,6 +216,7 @@ module.exports = function httpAdapter(config) {
|
|||||||
|
|
||||||
// make sure the content length is not over the maxContentLength if specified
|
// make sure the content length is not over the maxContentLength if specified
|
||||||
if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) {
|
if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) {
|
||||||
|
stream.destroy();
|
||||||
reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
||||||
config, null, lastRequest));
|
config, null, lastRequest));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user