feat(http): add status code 101, 103 for null body (#2655)

This commit is contained in:
asomethings
2025-05-01 01:52:23 +09:00
committed by GitHub
parent 91d1521a4c
commit 2448e717e5
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -229,9 +229,9 @@ export async function fetch(
rid
})
// no body for 204, 205 and 304
// see https://searchfox.org/mozilla-central/source/dom/fetch/Response.cpp#258
const body = [204, 205, 304].includes(status)
// no body for 101, 103, 204, 205 and 304
// see https://fetch.spec.whatwg.org/#null-body-status
const body = [101, 103, 204, 205, 304].includes(status)
? null
: new ReadableStream({
start: (controller) => {