[MGNLRES-211] Set contentType in ResourcesServlet Created: 08/Sep/15  Updated: 29/Mar/22  Resolved: 24/Sep/15

Status: Closed
Project: Magnolia Resources Module
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3.6, 2.4.2

Type: New Feature Priority: Neutral
Reporter: Robert Šiška Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.5h
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MAGNOLIA-6348 Crosscheck mime type of the response ... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:
Epic Link: contentTypeCheck
Sprint: Kromeriz 11
Story Points: 1
Team: Nucleus

 Comments   
Comment by Roman Kovařík [ 10/Sep/15 ]
  1. Do not override info.magnolia.module.resources.ResourcesServletTest#tearDown. MgnlContext is not set to null.
  2. Please align Strings:
     Session configMimeMapping = SessionTestUtil.createSession(RepositoryConstants.CONFIG,
                    "/server/MIMEMapping/css.extension=css\n" +
                            "/server/MIMEMapping/css.mime-type=text/css\n"
                    );
    
Comment by Robert Šiška [ 11/Sep/15 ]

The solution won't work in 2.3.6.

Comment by Robert Šiška [ 11/Sep/15 ]

ContentType is set in ResourcesBinaryRenderer and ResourcesTextTemplateRenderer for old resources mechanism (2.3.x and 2.4.x) and in ResourcesServlet for new mechanism (2.4.x).

Comment by Milan Divilek [ 15/Sep/15 ]

Reopen: info.magnolia.module.resources.renderers.ResourcesBinaryRenderer can fail on PathNotFoundException when binary node or jcr:mimeType property don't exist. This can happened when bypassing resource(resource is loaded from filesystem, classpath ...)

Comment by Milan Divilek [ 23/Sep/15 ]

Reopen: Why did you remove usage of injection ResourcesModul in ResourcesBinaryRenderer on master branch? You shouldn't remove the c-tor, it's API change.

Generated at Mon Feb 12 06:48:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.