-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Stefan Feier opened SPR-6686 and commented
It seems an old bug has cropped up again, see #10882
protected boolean isSupported(MediaType mediaType) {
if (mediaType == null) {
return true;
}
for (MediaType supportedMediaType : getSupportedMediaTypes()) {
if (supportedMediaType.includes(mediaType)) {
return true;
}
}
return false;
}
I think the check should be reversed:
if (mediaType.includes(supportedMediaType)) ....
Affects: 3.0 GA
Issue Links:
- Using @ResponseBody throws HttpMediaTypeNotAcceptableException when it supports writing an acceptable MediaType [SPR-6214] #10882 Using
@ResponseBodythrows HttpMediaTypeNotAcceptableException when it supports writing an acceptable MediaType - AbstractHttpMessageConverter canWrite logic the wrong way round?? [SPR-6970] #11635 AbstractHttpMessageConverter canWrite logic the wrong way round??
Referenced from: commits 8d5fc2b
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug