2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-18 12:39:44 +03:00

Fixing maxBodyLength exceeded error form follow-redirects when axios's maxContentLength is not exceeded

This commit is contained in:
Tim Garthwaite
2018-01-10 19:01:56 -05:00
parent 6e605016f0
commit bbfa7bfacc
+4
View File
@@ -128,6 +128,10 @@ module.exports = function httpAdapter(config) {
transport = isHttps ? httpsFollow : httpFollow;
}
if (config.maxContentLength) {
options.maxBodyLength = config.maxContentLength;
}
// Create the request
var req = transport.request(options, function handleResponse(res) {
if (req.aborted) return;