Skip to content

Commit c14e4d2

Browse files
#10150 If the contentType is set on the response the sitemesh WebAppContext needs to be kept in sync
1 parent 1fff01a commit c14e4d2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

grails-web-sitemesh/src/main/groovy/org/grails/web/sitemesh/GrailsContentBufferingResponse.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public void setContentType(String contentType) {
5656
this.contentProcessor = contentProcessor;
5757
this.webAppContext = webAppContext;
5858
pageResponseWrapper = (GrailsPageResponseWrapper) getResponse();
59+
if (response.getContentType() != null) {
60+
webAppContext.setContentType(response.getContentType());
61+
}
5962
}
6063

6164
public HttpServletResponse getTargetResponse() {

0 commit comments

Comments
 (0)