Browse Source

SPR-7233 - ResponseEntity having body, headers and HttpStatus mixed up in responseEntity.getBody()

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3376 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Arjen Poutsma 16 years ago
parent
commit
882f8cfce5
  1. 8
      org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java

8
org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java

@ -839,12 +839,12 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
} }
} }
if (AnnotationUtils.findAnnotation(handlerMethod, ResponseBody.class) != null) { if (returnValue instanceof HttpEntity) {
handleResponseBody(returnValue, webRequest); handleHttpEntityResponse((HttpEntity<?>) returnValue, webRequest);
return null; return null;
} }
else if (returnValue instanceof HttpEntity) { else if (AnnotationUtils.findAnnotation(handlerMethod, ResponseBody.class) != null) {
handleHttpEntityResponse((HttpEntity<?>) returnValue, webRequest); handleResponseBody(returnValue, webRequest);
return null; return null;
} }
else if (returnValue instanceof ModelAndView) { else if (returnValue instanceof ModelAndView) {

Loading…
Cancel
Save