Skip to content

Commit

Permalink
Remove StreamingCompatibleResponse polyfill (#7981)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored and ematipico committed Aug 8, 2023
1 parent b675acb commit 70f34f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 82 deletions.
5 changes: 5 additions & 0 deletions .changeset/purple-buses-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Remove StreamingCompatibleResponse polyfill
3 changes: 1 addition & 2 deletions packages/astro/src/runtime/server/render/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { RouteData, SSRResult } from '../../../@types/astro';
import { renderComponentToString, type NonAstroPageComponent } from './component.js';
import type { AstroComponentFactory } from './index';

import { createResponse } from '../response.js';
import { isAstroComponentFactory } from './astro/index.js';
import { renderToReadableStream, renderToString } from './astro/render.js';
import { encoder } from './common.js';
Expand Down Expand Up @@ -64,6 +63,6 @@ export async function renderPage(
body = encoder.encode(body);
headers.set('Content-Length', body.byteLength.toString());
}
const response = createResponse(body, { ...init, headers });
const response = new Response(body, { ...init, headers });
return response;
}
80 changes: 0 additions & 80 deletions packages/astro/src/runtime/server/response.ts

This file was deleted.

0 comments on commit 70f34f5

Please sign in to comment.