[MGNLRSSAGG-27] Parameterize "contentType" in Feed to facilitate feeds that are not of contentType "text/xml" Created: 18/Nov/09  Updated: 09/Feb/15  Resolved: 25/Nov/09

Status: Closed
Project: Magnolia RSS Aggregator Module
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 1.1

Type: Improvement Priority: Minor
Reporter: Ryan Gardner Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: feeds
Remaining Estimate: 0.5h
Time Spent: Not Specified
Original Estimate: 0.5h

Attachments: Text File parameterizeFeedContentType.patch    
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)
Testcase included:
Yes
Date of First Response:

 Description   

The FeedSyndicationServlet is currently hardcoded to set the contentType to "text/xml"

It would be useful to take advantage of the RSSAggregator for other kinds of feeds - such as an ICS feed based on events in the repository. ICS feeds require a content type of "text/calendar" not "text/xml"

The changes in the included patch are fairly minimal but allows a Feed to return a contentType that is then set in the servlet. The existing abstract servlet is updated to set a default contentType. Two unit tests were modified - one was updated to include the updated signature of the FeedSyndicationServlet.writeToResponse and the other test was modified to assert that the contentType of an RSS feed is set correctly to "text/xml" still after the changes.



 Comments   
Comment by Jan Haderka [ 25/Nov/09 ]

Applied. Thanks for the patch.
I've done some small changes as you might notice, such as we can't change method signature or remove them completely without deprecating this method for while first, and so on.

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