bito-code-review[bot] commented on PR #15801:
URL: https://github.com/apache/grails-core/pull/15801#issuecomment-4854904716

   <!-- Bito Reply -->
   The change ensures that when the content type is unknown, the system 
defaults to 'text/plain' instead of 'text/html'. This is achieved by updating 
the `applyContentType` method to accept a `defaultContentType` parameter, which 
is then passed to `resolveContentTypeBySourceType` when the content type cannot 
be determined.
   
   
**grails-controllers/src/main/groovy/grails/artefact/controller/support/ResponseRenderer.groovy**
   ```
   private boolean applyContentType(HttpServletResponse response, Map argMap, 
Object renderArgument, boolean useDefault, String defaultContentType) {
           boolean contentTypeIsDefault = true
           String contentType = resolveContentTypeBySourceType(renderArgument, 
useDefault ? defaultContentType : null)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to