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