Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make DataOutputAgent serve RSS output as application/rss+xml #1973

Merged
merged 1 commit into from
Apr 19, 2017

Conversation

knu
Copy link
Member

@knu knu commented Apr 19, 2017

For backward compatibility, a new option rss_content_type is added and existing agents will have its value set to text/xml, which was the Content-Type value before this change.

This fixes #1968.

@@ -165,6 +166,10 @@ def feed_description
interpolated['template']['description'].presence || "A feed of Events received by the '#{name}' Huginn Agent"
end

def rss_content_type
interpolated['rss_content_type'] || 'application/rss+xml'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe interpolated['rss_content_type'].presence || 'application/rss+xml' to ignore blanks?

Copy link
Member

@cantino cantino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

agent.save(validate: false)
end
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a down too?

For backward compatibility, a new option `rss_content_type` is added
and existing agents will have its value set to `text/xml`, which was
the Content-Type value before this change.

This fixes #1968.
@knu
Copy link
Member Author

knu commented Apr 19, 2017

@cantino Thanks, fixed.

@knu knu merged commit 7c30c28 into master Apr 19, 2017
@knu knu deleted the rss_content_type branch April 19, 2017 08:59
@cantino
Copy link
Member

cantino commented Apr 19, 2017

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data Output Agent - option to change content type returned?
2 participants