The Wayback Machine - https://web.archive.org/web/20211009072041/https://github.com/vapor/vapor/issues/2650
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 Errors are reported as internal server errors #2650

Open
0xTim opened this issue Jul 12, 2021 · 1 comment
Open

Multipart Errors are reported as internal server errors #2650

0xTim opened this issue Jul 12, 2021 · 1 comment

Comments

@0xTim
Copy link
Member

@0xTim 0xTim commented Jul 12, 2021

When sending a request body that decodes a Content type. If the request is sent as multipart with the right header set, but the body is empty, a 500 error is returned. This can cause problems with apps that have automatic reporting for internal server errors as it should be reported as a bad request

@0xTim 0xTim added the bug label Jul 12, 2021
@0xTim 0xTim added good first issue and removed bug labels Aug 6, 2021
@JakeTiritilli
Copy link

@JakeTiritilli JakeTiritilli commented Aug 7, 2021

I’ll work on trying to fix this one.

paunik pushed a commit to paunik/vapor that referenced this issue Aug 22, 2021
In order to prevent 5xx internal error we try to:

- validate number of parameters in FormDataDecoder so we can detect when only boundary is present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants