mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +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;
|
transport = isHttps ? httpsFollow : httpFollow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.maxContentLength) {
|
||||||
|
options.maxBodyLength = config.maxContentLength;
|
||||||
|
}
|
||||||
|
|
||||||
// Create the request
|
// Create the request
|
||||||
var req = transport.request(options, function handleResponse(res) {
|
var req = transport.request(options, function handleResponse(res) {
|
||||||
if (req.aborted) return;
|
if (req.aborted) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user