Skip to content

Commit e452f76

Browse files
author
Tim Garthwaite
committed
Don't set maxBodyLength in follow-redirects if maxContentLength is -1
1 parent bbfa7bf commit e452f76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/adapters/http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ module.exports = function httpAdapter(config) {
128128
transport = isHttps ? httpsFollow : httpFollow;
129129
}
130130

131-
if (config.maxContentLength) {
131+
if (config.maxContentLength && maxBodyLength > -1) {
132132
options.maxBodyLength = config.maxContentLength;
133133
}
134134

0 commit comments

Comments
 (0)