Max streamed upload configuration value #184
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
maxUploadSize
does not provide enough control over how much data should be uploaded. Routes that stream data require a much larger upload size limit as you are limiting how much data can be uploaded, while routes that collate the request body into one ByteBuffer require a smaller one as you are limiting how much memory you can hold in memory at any one time.With this in mind this PR adds an additional
maxStreamedUploadSize
value to the application config. This value is probably the equivalent of the originalmaxUploadSize
and is passed down to the server. ThemaxUploadSize
is now used to limit the size of a ByteBuffer that can be collated from a stream.