2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Fix/4263/maxbodylength defaults (#4731)

* test(http): add test case for default body length in follow-redirects

* fix(http): provide proper default body length to follow-redirects

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Dimitris Halatsis
2022-05-20 09:27:37 +03:00
committed by GitHub
parent c30252f685
commit e9c9f3392b
2 changed files with 33 additions and 0 deletions
+3
View File
@@ -279,6 +279,9 @@ module.exports = function httpAdapter(config) {
if (config.maxBodyLength > -1) {
options.maxBodyLength = config.maxBodyLength;
} else {
// follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited
options.maxBodyLength = Infinity;
}
if (config.insecureHTTPParser) {