Skip to content

Commit

Permalink
Merge branch 'main' of github.com:sinskiy/astro
Browse files Browse the repository at this point in the history
  • Loading branch information
sinskiy committed Dec 28, 2024
2 parents a743ff2 + 3910815 commit 2d02170
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-pumas-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/rss': patch
---

Revert incorrect Content-Type header applied for RSS XML file
2 changes: 1 addition & 1 deletion packages/astro-rss/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default async function getRssResponse(rssOptions: RSSOptions): Promise<Re
const rssString = await getRssString(rssOptions);
return new Response(rssString, {
headers: {
'Content-Type': 'application/rss+xml; charset=utf-8',
'Content-Type': 'application/xml',
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/astro-rss/test/rss.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('rss', () => {
assertXmlDeepEqual(str, validXmlResult);

const contentType = response.headers.get('Content-Type');
assert.equal(contentType, 'application/rss+xml; charset=utf-8');
assert.equal(contentType, 'application/xml');
});

it('should be the same string as getRssString', async () => {
Expand Down

0 comments on commit 2d02170

Please sign in to comment.