mbien commented on code in PR #174:
URL: https://github.com/apache/roller/pull/174#discussion_r3940613803


##########
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:
   > or uppercase, on a case-sensitive container
   
   the name is normalized before the method reference of `getMimeType(name)` is 
called. So at least case should not matter, no?



-- 
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