Closed
Description
Andrei Badea opened SPR-11828 and commented
When I send a HTTP request with an empty body, the respective controller method is invoked with a null argument for the parameter annotated with @RequestBody
. Instead, a HttpMessageNotReadableException should be thrown.
This may be a regression introduced by the fix of #14575. Note that fix removed the statement that threw HttpMessageNotReadableException.
Affects: 3.2.8
Issue Links:
- HttpMessageNotReadableException when @RequestBody(required=false) [SPR-9942] #14575 HttpMessageNotReadableException when
@RequestBody
(required=false) - @RequestBody should have a required parameter to allow a request body to be optional [SPR-9239] #13877
@RequestBody
should have a required parameter to allow a request body to be optional - Contract of @RequestPart(required=false) not obeyed [SPR-12860] #17458 Contract of
@RequestPart
(required=false) not obeyed - HttpEntity controller method arguments should allow null body [SPR-12861] #17459 HttpEntity controller method arguments should allow null body
- Re-allow handling empty request body [SPR-12778] #17376 Re-allow handling empty request body
Referenced from: commits de1a41a