summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chloe Arciniega <chloe@sapphic.moe> 2024-12-26 13:52:34 +0500
committerGravatar GitHub <noreply@github.com> 2024-12-26 08:52:34 +0000
commitebe2aa95c7f4a6559cec8b82d155da34a57bdd53 (patch)
treee72a909cd5be682df34260fc92d28277e281cf5d
parent1fab2f2ef671cc265c8dd46c5858915f971f2478 (diff)
downloadastro-ebe2aa95c7f4a6559cec8b82d155da34a57bdd53.tar.gz
astro-ebe2aa95c7f4a6559cec8b82d155da34a57bdd53.tar.zst
astro-ebe2aa95c7f4a6559cec8b82d155da34a57bdd53.zip
fix(@astrojs/rss): revert incorrect Content-Type header applied for RSS XML file (#12829)
* fix: revert content-type changes * chore: changeset
-rw-r--r--.changeset/hot-pumas-attack.md5
-rw-r--r--packages/astro-rss/src/index.ts2
-rw-r--r--packages/astro-rss/test/rss.test.js2
3 files changed, 7 insertions, 2 deletions
diff --git a/.changeset/hot-pumas-attack.md b/.changeset/hot-pumas-attack.md
new file mode 100644
index 000000000..3dc33cbc1
--- /dev/null
+++ b/.changeset/hot-pumas-attack.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/rss': patch
+---
+
+Revert incorrect Content-Type header applied for RSS XML file
diff --git a/packages/astro-rss/src/index.ts b/packages/astro-rss/src/index.ts
index 23984f9fb..33a8f66a0 100644
--- a/packages/astro-rss/src/index.ts
+++ b/packages/astro-rss/src/index.ts
@@ -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',
},
});
}
diff --git a/packages/astro-rss/test/rss.test.js b/packages/astro-rss/test/rss.test.js
index f1d69dbe9..8014f87fe 100644
--- a/packages/astro-rss/test/rss.test.js
+++ b/packages/astro-rss/test/rss.test.js
@@ -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 () => {