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
Precondition failure when write request body into file asyncronously. #2985
Comments
This should now be fixed, feel free to reopen if not! |
@0xTim, still can reproduce. I created hello world project with
|
I can confirm, this bug still exists in Vapor 4.92.1, any ideas how to fix it? 🤔 |
@tib does the |
Can't find the branch |
@hsharghi we've just released https://github.com/vapor/vapor/releases/tag/4.92.3 which has the fix in it |
@alex1704 do you want to confirm it's fixed? |
@0xTim sure, will test it later. |
@0xTim The issue still exists
|
yep, can confirm hsharghi message, bug still persists in 4.92.3 version. |
Describe the bug
I'm implementing upload functionality with HTTPBodyStreamStrategy == .stream. Inside request handler i'm writing data to file in chunks ayncronously. When large file is uploaded precondition failure is executed.
Here is my implementation:
To Reproduce
mkfile -n 600m file
curl -X POST 'http://localhost:8080/upload' --data-binary '@file'
Also i noticed that error appear after repeating curl request several times on smaller files, like 100M.
Expected behavior
No error should happen.
If i use futures implementation, everything works fine.
Environment
The text was updated successfully, but these errors were encountered: