0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

fix(@astrojs/rss): revert incorrect Content-Type header applied for RSS XML file (#12829)

* fix: revert content-type changes

* chore: changeset
This commit is contained in:
Chloe Arciniega 2024-12-26 13:52:34 +05:00 committed by GitHub
parent 1fab2f2ef6
commit ebe2aa95c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/rss': patch
---
Revert incorrect Content-Type header applied for RSS XML file

View file

@ -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',
},
});
}

View file

@ -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 () => {