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

master
Arjen Poutsma 15 years ago
parent 75c5405d6f
commit d0393ea109
  1. 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) {
handleResponseBody(returnValue, webRequest);
if (returnValue instanceof HttpEntity) {
handleHttpEntityResponse((HttpEntity<?>) returnValue, webRequest);
return null;
}
else if (returnValue instanceof HttpEntity) {
handleHttpEntityResponse((HttpEntity<?>) returnValue, webRequest);
else if (AnnotationUtils.findAnnotation(handlerMethod, ResponseBody.class) != null) {
handleResponseBody(returnValue, webRequest);
return null;
}
else if (returnValue instanceof ModelAndView) {

Loading…
Cancel
Save