[MAGNOLIA-6452] Add contentType field to renderers Created: 03/Dec/15  Updated: 28/Nov/22  Resolved: 26/Jan/16

Status: Closed
Project: Magnolia
Component/s: rendering
Affects Version/s: 5.3.12, 5.4.3
Fix Version/s: 5.3.13, 5.4.5

Type: Bug Priority: Critical
Reporter: Bence Vass Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: 0d
Time Spent: 2h 20m
Original Estimate: Not Specified

Issue Links:
Relates
causality
caused by MAGNOLIA-6367 Set correct Content-Type header of re... Closed
is causing MGNLGS-119 ContentType of XML-Sitemap wrong (Reg... Closed
is causing MGNLRES-254 Renderer needs to respect content typ... Closed
is causing MAGNOLIA-8658 Programmatic rendering Closed
dependency
depends upon MAGNOLIA-6478 Don't set Content-Type header in Cont... Closed
is depended upon by MGNLGS-113 ContentType of XML-Sitemap is text/html Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Move setting of Content-Type header to where the content is generated
Sprint: Kromeriz 28
Story Points: 3

 Description   

FreemarkerRenderer used to use the mimeType derived from the requested extension. Now it uses text/html every time.

This was added:

response.setContentType(MIMEMapping.getMIMETypeOrDefault(MIMEMapping.DEFAULT_EXTENSION));

FreemarkerRender and JspRenderer should be able to set ContentType.



 Comments   
Comment by Roman Kovařík [ 22/Jan/16 ]

Reopened:
it shouldn't be possible to be able to set content type on every definition. Only first one in a page is taken into account. We should move the configuration to renderer.

Generated at Mon Feb 12 04:14:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.