SPR-7381 - HTTP headers returned as part of ResponseEntity(MultiValueMap<String, String> headers, HttpStatus statusCode) are ignored when using this constructor

This commit is contained in:
Arjen Poutsma
2010-07-16 13:47:19 +00:00
parent 228c0b18cb
commit c24ffc9175
2 changed files with 8 additions and 1 deletions

View File

@@ -938,6 +938,10 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
if (body != null) {
writeWithMessageConverters(body, inputMessage, outputMessage);
}
else {
// flush headers
outputMessage.getBody();
}
}
@SuppressWarnings("unchecked")