Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/Http/Controllers/FeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ private function feedAction(ComponentGroup &$group, $isRss)
});
}

return $this->feed->render($isRss ? 'rss' : 'atom');
$content = $this->feed->render($isRss ? 'rss' : 'atom');
$contentType = $isRss ? 'application/rss+xml; charset=UTF-8' : 'application/atom+xml; charset=UTF-8';

return response($content, 200, ['Content-Type' => $contentType]);
Comment on lines +93 to +96
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

Consider keeping the feed library’s ctype configuration and the HTTP response header aligned. The controller sets $this->feed->ctype = 'text/xml' in the constructor, but this method now sends application/atom+xml / application/rss+xml. Updating ctype per format (or removing the now-redundant ctype setting) avoids conflicting sources of truth for Content-Type and makes behavior consistent across environments.

Copilot uses AI. Check for mistakes.
Comment on lines +93 to +96
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

Please add/request-level test coverage to lock in the intended Content-Type behavior for /atom and /rss (including the charset parameter). The repo already asserts Content-Type headers in API tests, and without a test this regression could reappear with framework/middleware changes.

Copilot uses AI. Check for mistakes.
}

/**
Expand Down
Loading