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

Multipart request body too large does not set error Status Code #3212

Open
Tadimsky opened this issue Aug 7, 2024 · 0 comments
Open

Multipart request body too large does not set error Status Code #3212

Tadimsky opened this issue Aug 7, 2024 · 0 comments

Comments

@Tadimsky
Copy link

Tadimsky commented Aug 7, 2024

What happened?

If you upload a file that is too large via the Multipart transport, it returns an error to the client but does not set a non-200 error code.

What did you expect?

I would expect to write a http.StatusRequestEntityTooLarge as the status.
This is the only error in the codebase I could find where we don't specifically set a status:

if r.ContentLength > f.maxUploadSize() {
writeJsonError(w, "failed to parse multipart form, request body too large")
return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant