Closed
Description
Jean-Baptiste Nizet opened SPR-13417 and commented
I'm migrating from 4.1.2 to 4.2.1, and am observing a regression.
A RestController method annotated with @RequestMapping(method = POST)
and having an argument annotated with @RequestBody(required = false)
causes a 415 response to be sent back by Spring MVC if the request doesn't have a body.
This used to work. And the behavior contradicts the javadoc of RequestBody.
BTW, a similar bug used to exist, and had been fixed: #14575.
Affects: 4.2.1
Issue Links:
- HttpMessageNotReadableException when @RequestBody(required=false) [SPR-9942] #14575 HttpMessageNotReadableException when
@RequestBody
(required=false)
Referenced from: commits spring-attic/spring-framework-issues@6bdf345, spring-attic/spring-framework-issues@fb75c0d