-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return status 400 on invalid file names
The multipart middleware would throw an exception when it encountered an invalid filename. For most apps that exception would be caught by the default exception handler and result in a status code of 500 instead of 400. This commit catches this specific exception and returns a 400 response from the server instead. The error response is made customizable through the optional :invalid-filename-handler.
- Loading branch information
Showing
2 changed files
with
98 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters