Skip to content

Commit ebe2aa9

Browse files
authored
fix(@astrojs/rss): revert incorrect Content-Type header applied for RSS XML file (#12829)
* fix: revert content-type changes * chore: changeset
1 parent 1fab2f2 commit ebe2aa9

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.changeset/hot-pumas-attack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/rss': patch
3+
---
4+
5+
Revert incorrect Content-Type header applied for RSS XML file

packages/astro-rss/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default async function getRssResponse(rssOptions: RSSOptions): Promise<Re
8989
const rssString = await getRssString(rssOptions);
9090
return new Response(rssString, {
9191
headers: {
92-
'Content-Type': 'application/rss+xml; charset=utf-8',
92+
'Content-Type': 'application/xml',
9393
},
9494
});
9595
}

packages/astro-rss/test/rss.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe('rss', () => {
6262
assertXmlDeepEqual(str, validXmlResult);
6363

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

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

0 commit comments

Comments
 (0)