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
File upload is limited to 1GB when using MultipartBody #10666
Comments
probably a bug in MicronautHttpData |
I have a reproducer, it happens only with This is the reproducer project: It can be reproduced using the following cURL:
|
Just checked Micronaut Platform 4.4.1 and the issue still exists. |
The code path was not covered by tests and was broken. I also replaced the ReentrantLock by a NonReentrantLock that is based on a Semaphore. This is because there are some semantic checks in Chunk that might not work with a reentrant lock (e.g. repeated deallocate calls could lead to ref count errors). But this is unrelated to the bug. Fixes #10666
* Fix file uploads beyond MMAP_SEGMENT_SIZE The code path was not covered by tests and was broken. I also replaced the ReentrantLock by a NonReentrantLock that is based on a Semaphore. This is because there are some semantic checks in Chunk that might not work with a reentrant lock (e.g. repeated deallocate calls could lead to ref count errors). But this is unrelated to the bug. Fixes #10666 * Update http-server-netty/src/main/java/io/micronaut/http/server/netty/NonReentrantLock.java Co-authored-by: Sergio del Amo <sergio.delamo@softamo.com> * make badssl more resilient to timeouts * make badssl more resilient to timeouts --------- Co-authored-by: Sergio del Amo <sergio.delamo@softamo.com>
Thanks for the report! |
Expected Behavior
We ca upload files of anysize when using MultipartBody
Actual Behaviour
I have an endpoint that can handle multipart request with multiple parts of unknown names, some are files, some are not.
The only way to deal with such endpoint is to bind the body to
@Body MultiparBody body
then doing something like that:However, when I create the file, it only store 1GB whereas my file in the part is approx 1.7GB.
When I call
fileUpload.getSize()
it correctly reports the correct file size (1.7GB in my case) but the generated file is only 1GB long, in fact it seems to be the underlying InputStream that limit to 1BG.Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
4.3.4
The text was updated successfully, but these errors were encountered: