mirror of
https://github.com/tenrok/axios.git
synced 2026-06-05 16:42:32 +03:00
Merge pull request #1287 from mividtim/mividtim/follow-redirects-max-length
Set maxBodyLength on follow-redirects to match maxContentLength on AxiosOptions
This commit is contained in:
@@ -128,6 +128,10 @@ module.exports = function httpAdapter(config) {
|
||||
transport = isHttps ? httpsFollow : httpFollow;
|
||||
}
|
||||
|
||||
if (config.maxContentLength && config.maxContentLength > -1) {
|
||||
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