2
0
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:
Emily Morehouse
2018-02-11 13:25:55 -06:00
committed by GitHub
+4
View File
@@ -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;