[MGNLCACHE-38] CacheResponseWrapper doesn't retrieve contentType correctly Created: 22/Nov/13  Updated: 03/Jun/20  Resolved: 09/Apr/20

Status: Closed
Project: Cache Modules
Component/s: None
Affects Version/s: 5.1, 5.6.3, 5.8.1
Fix Version/s: 5.6.4, 5.8.3, 5.9.1

Type: Bug Priority: Major
Reporter: Tytgat Christian Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: maintenance
Remaining Estimate: 0.65h
Time Spent: 0.45h
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Relates
causality
Template:
Patch included:
Yes
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
Testcase included:
Yes
Release notes required:
Yes
Date of First Response:
Epic Link: Support
Sprint: Maintenance 1, Maintenance 2
Story Points: 8

 Description   

I added a (spring MVC) rest service for one of my content workspaces and noticed that cached responses have a content-type header of text/html instead of application/json.

From what I can see, this is because CacheResponseWrapper stores the content-type header in its own map, but when invoking
final String contentType = cachedResponse.getContentType()
in Store.java
then the header is incorrectly retrieved from the wrapped object instead, which holds a default text/html content type.


Generated at Sun Feb 11 23:51:35 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.