axum
axum copied to clipboard
Weird behavior when returning response without consuming multipart body [REPRO]
A bit more explanation and instructions on how to see what I mean directly can be found in this reproduction: https://github.com/fs-99/axum-multipart-bug-repro
The problem I'm facing appears when verifying size limits on very large file uploads with axum. The body/request size limit holds, but if the body is not buffered completely beforehand, the frontend does not receive a "413 Payload Too Large" error, just a "network error". This might be because closing a stream does not sit well with browsers, in which case this is a browser issue. Postman does not seem to have this problem, it rightfully receives a 413 from the server.
As Discussed in https://github.com/tokio-rs/axum/discussions/2445
Originally posted by momozahara December 25, 2023
(there was another one)