mirror of
https://github.com/tenrok/axios.git
synced 2026-05-30 15:24:11 +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
|
||||
if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) {
|
||||
stream.destroy();
|
||||
reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
||||
config, null, lastRequest));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user