[MGNLCACHE-229] Cached REST Responses lose Content-Type header Created: 06/Jul/20 Updated: 20/Jul/20 Resolved: 20/Jul/20 |
|
| Status: | Closed |
| Project: | Cache Modules |
| Component/s: | None |
| Affects Version/s: | 5.6, 5.6.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Horst L | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | cache, caching, rest | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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
|
| Date of First Response: |
| Description |
|
REST Responses stored and replayed from cache don't keep their original Content-Type header. This problem exists in Magnolia 5.7 and 6+. For us this only happens for JSON responses we serve from a REST endpoint, but i think this happens to every response without an extension. I think the problem is caused by the replay function in ContentCachedEntry.java. Here, the content type is always overwritten regardless of the current value of the response. If getContentType() returns a null value the original Content-Type will always be deleted. |
| Comments |
| Comment by Mercedes Iruela [ 20/Jul/20 ] |
|
Hi Horst, The issue that you are reporting seems similar to Regards, |
| Comment by Horst L [ 20/Jul/20 ] |
|
Hi Mercedes, thank you for your response, selecting 5.9.1 was an error on my side. Thanks for the hint with |
| Comment by Mercedes Iruela [ 20/Jul/20 ] |
|
You are welcome, we are closing this ticket then, thanks for reporting issues in Magnolia and Help us to improve the product. |