Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusion between maxContentLength and maxBodyLength #2696

Closed
chinesedfan opened this issue Jan 27, 2020 · 2 comments
Closed

Confusion between maxContentLength and maxBodyLength #2696

chinesedfan opened this issue Jan 27, 2020 · 2 comments

Comments

@chinesedfan
Copy link
Collaborator

chinesedfan commented Jan 27, 2020

Backgrounds,

  • axios has a config option called maxContentLength, which means the max response content size.
  • And follow-redirects provides another option called maxBodyLength, which means the max request body size.

I don't think they are the same. So why did we connect them in #1286?
(cc @mividtim @RubenVerborgh @emilyemorehouse)

if (config.maxContentLength && config.maxContentLength > -1) {
    options.maxBodyLength = config.maxContentLength;
}

I guess we need design a new option called maxBodyLength exactly and set its default value correctly to avoid cases like #1362 (comment).

@RubenVerborgh
Copy link

I don't think they are the same.

I confirm that they are not the same.

follow-redirects has a maxBodyLength, because it needs to buffer the request body entity in memory for cases where a POST or PUT request results in a redirect.

@chinesedfan
Copy link
Collaborator Author

Fixed by #2781.

@axios axios locked and limited conversation to collaborators May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants