mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
e81a430e61
Prior to this commit, requests with an empty body and no Content-Type header set would fail with a HttpMediaTypeNotSupportedException when mapped to a Controller method argument annotated with @RequestBody(required=false). In those cases, the server implementation considers with an "application/octet-stream" content type and polls messageconverters for conversion. If no messageconverter is able to process this request, a HttpMediaTypeNotSupportedException is thrown. This change makes sure that such exceptions are not thrown if the incoming request has: * no body * no content-type header In this case, a null value is returned. Issue: SPR-13147