Skip to content

Commit

Permalink
Fix null status body response
Browse files Browse the repository at this point in the history
  • Loading branch information
GregBrimble committed Feb 7, 2022
1 parent ab60cad commit 59dc876
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/standards/http.ts
Expand Up @@ -796,7 +796,11 @@ export async function fetch(
headers,
});
} else {
res = new Response(baseRes.body, baseRes);
// https://fetch.spec.whatwg.org/#null-body-status
res = new Response(
[101, 204, 205, 304].includes(baseRes.status) ? null : baseRes.body,
baseRes
);
}

await waitForOpenInputGate();
Expand Down

0 comments on commit 59dc876

Please sign in to comment.