mbien commented on code in PR #174:
URL: https://github.com/apache/roller/pull/174#discussion_r3940620865
##########
app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PreviewResourceServlet.java:
##########
@@ -160,8 +163,19 @@ public void doGet(HttpServletRequest request,
HttpServletResponse response)
}
// set the content type based on whatever is in our web.xml mime defs
- response.setContentType(this.context.getMimeType(resourceRequest
- .getResourcePath()));
+ String resourceType = this.context.getMimeType(
+ resourceRequest.getResourcePath());
+ if (fromUploadedMedia) {
+ // Uploaded through the media library, so it is governed by the
+ // same policy as any other media response.
+ MediaTypePolicy.applyResponseHeaders(response, resourceType,
Review Comment:
sorry, I just realized a commit was added _after_ this comment was posted.
--
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]