diff --git a/.changeset/sweet-ligers-push.md b/.changeset/sweet-ligers-push.md new file mode 100644 index 000000000..6b50678e2 --- /dev/null +++ b/.changeset/sweet-ligers-push.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Remove explicit `Transfer-Encoding: chunked` header from streaming responses diff --git a/packages/astro/src/core/render/core.ts b/packages/astro/src/core/render/core.ts index e5b604cba..c9efe02de 100644 --- a/packages/astro/src/core/render/core.ts +++ b/packages/astro/src/core/render/core.ts @@ -149,7 +149,6 @@ export async function render(opts: RenderOptions): Promise { site, scripts, ssr, - streaming, status, }); diff --git a/packages/astro/src/core/render/result.ts b/packages/astro/src/core/render/result.ts index dc5be4a07..9eb618cb3 100644 --- a/packages/astro/src/core/render/result.ts +++ b/packages/astro/src/core/render/result.ts @@ -27,7 +27,6 @@ function onlyAvailableInSSR(name: string) { export interface CreateResultArgs { adapterName: string | undefined; ssr: boolean; - streaming: boolean; logging: LogOptions; origin: string; markdown: MarkdownRenderingOptions; @@ -126,12 +125,7 @@ export function createResult(args: CreateResultArgs): SSRResult { const url = new URL(request.url); const headers = new Headers(); - if (args.streaming) { - headers.set('Transfer-Encoding', 'chunked'); - headers.set('Content-Type', 'text/html'); - } else { - headers.set('Content-Type', 'text/html'); - } + headers.set('Content-Type', 'text/html'); const response: ResponseInit = { status: args.status, statusText: 'OK',