SPR-6877 - AnnotationMethodHandlerAdapter.handleResponseBody prioritizes messageConverter over MediaType

This commit is contained in:
Arjen Poutsma 2010-03-03 11:14:30 +00:00
parent 7f8c91a52d
commit 3c8a47bd06
1 changed files with 1 additions and 0 deletions

View File

@ -2209,6 +2209,7 @@ public class ServletAnnotationControllerTests {
public void write(Object o, MediaType contentType, HttpOutputMessage outputMessage) public void write(Object o, MediaType contentType, HttpOutputMessage outputMessage)
throws IOException, HttpMessageNotWritableException { throws IOException, HttpMessageNotWritableException {
outputMessage.getHeaders().setContentType(contentType); outputMessage.getHeaders().setContentType(contentType);
outputMessage.getBody(); // force a header write
} }
} }