Skip to content

Commit

Permalink
Remove StreamingCompatibleResponse polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Aug 7, 2023
1 parent 2eb6252 commit e51fc7c
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 e51fc7c

Please sign in to comment.