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:
parent
1fab2f2ef6
commit
ebe2aa95c7
3 changed files with 7 additions and 2 deletions
5
.changeset/hot-pumas-attack.md
Normal file
5
.changeset/hot-pumas-attack.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@astrojs/rss': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Revert incorrect Content-Type header applied for RSS XML file
|
|
@ -89,7 +89,7 @@ export default async function getRssResponse(rssOptions: RSSOptions): Promise<Re
|
||||||
const rssString = await getRssString(rssOptions);
|
const rssString = await getRssString(rssOptions);
|
||||||
return new Response(rssString, {
|
return new Response(rssString, {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/rss+xml; charset=utf-8',
|
'Content-Type': 'application/xml',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ describe('rss', () => {
|
||||||
assertXmlDeepEqual(str, validXmlResult);
|
assertXmlDeepEqual(str, validXmlResult);
|
||||||
|
|
||||||
const contentType = response.headers.get('Content-Type');
|
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 () => {
|
it('should be the same string as getRssString', async () => {
|
||||||
|
|
Loading…
Reference in a new issue