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

max upload size checked after full upload? #53

Closed
aikomastboom opened this issue Jun 1, 2023 · 1 comment
Closed

max upload size checked after full upload? #53

aikomastboom opened this issue Jun 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@aikomastboom
Copy link

Hi,
It looks like the file is completely uploaded before the config.server.max_content_length check is done when parsing the chunks.
I did a little searching and found this StackOverflow question that might point towards a solution to check earlier in the request flow.

actix-web: limit upload file size

Of course when using a proxy forwarder NGINX, Apache it can be configured to stop the upload too, preventing an unending upload from filling up servers disk. For the Rust Reverse Proxy Sōzu I could not find such a configuration option (yet).

@orhun orhun added the bug Something isn't working label Jun 4, 2023
@orhun
Copy link
Owner

orhun commented Jun 5, 2023

Hey, I implemented this in 1670a71

Thanks for bringing this to my attention and sharing the solution! 💖

@orhun orhun closed this as completed Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants