Commit e313c7d
committed
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.1 parent f39f06c commit e313c7d
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
174 | 178 | | |
175 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
0 commit comments