Accept header handling is inconsistent [SPR-16750] #21291
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: declined
A suggestion or change that we don't feel we should currently apply
Petar Cvitanusic opened SPR-16750 and commented
The fix for #20798 is breaking a bunch of our tests. I do agree with the fix in #20798 that Spring returns a 200 when the base is the same. For example Accepting "application/json" but returning "application/msword" is totally valid.
We have a controller method that returns attachments that can be different content types. In some cases spring throws a 406, in others it produces a 200.
The controller method does not specify what it produces, rather we specify the Content-Type header for the ResponseEntity:
Scenario:
Affects: 5.0.3, 5.0.4, 5.0.5
Reference URL: #20798
The text was updated successfully, but these errors were encountered: