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

Set maxBodyLength to 100MB to allow larger feature uploads #736

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

stewartfrancis
Copy link
Contributor

@stewartfrancis stewartfrancis commented Jan 29, 2024

follow-redirects npm doc states that it's a drop-in replacement for the native http and https modules, but it turns out that's not quite true as it additionally sets a maximum HTTP request body length of 10MB by default. I expect this is because the request body is cached internally so it can be replayed, so is done in order to manage memory usage.

This overrides the default maxBodySize to 100MB as a quick fix to allow larger devcontainer features to be published with the CLI. Without this, some more expensive solution like chunking would be required.

Fixes #270

@stewartfrancis stewartfrancis requested a review from a team as a code owner January 29, 2024 13:03
@stewartfrancis
Copy link
Contributor Author

I don't know if you have a better suggestion than any for the generic type parameter for FollowOptions? It's not relevant for the property we're wanting to set in this case anyway, so any seemed ok to me.

Copy link
Contributor

@chrmarti chrmarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@chrmarti chrmarti merged commit 22fc75e into devcontainers:main Jan 30, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting ERR_FR_MAX_BODY_LENGTH_EXCEEDED with 12MB Feature
3 participants