mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-21 13:31:46 +00:00
SPR-6214 - Using @ResponseBody throws HttpMediaTypeNotAcceptableException when it supports writing an acceptable MediaType
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2109 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+1
-1
@@ -789,7 +789,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator implemen
|
||||
for (Object o : messageConverter.getSupportedMediaTypes()) {
|
||||
MediaType supportedMediaType = (MediaType) o;
|
||||
for (MediaType acceptedMediaType : acceptedMediaTypes) {
|
||||
if (supportedMediaType.includes(acceptedMediaType)) {
|
||||
if (acceptedMediaType.includes(supportedMediaType)) {
|
||||
messageConverter.write(returnValue, outputMessage);
|
||||
this.responseArgumentUsed = true;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user