Skip to content

Commit 2448e71

Browse files
authored
feat(http): add status code 101, 103 for null body (#2655)
1 parent 91d1521 commit 2448e71

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

plugins/http/api-iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/http/guest-js/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ export async function fetch(
229229
rid
230230
})
231231

232-
// no body for 204, 205 and 304
233-
// see https://searchfox.org/mozilla-central/source/dom/fetch/Response.cpp#258
234-
const body = [204, 205, 304].includes(status)
232+
// no body for 101, 103, 204, 205 and 304
233+
// see https://fetch.spec.whatwg.org/#null-body-status
234+
const body = [101, 103, 204, 205, 304].includes(status)
235235
? null
236236
: new ReadableStream({
237237
start: (controller) => {

0 commit comments

Comments
 (0)