[whatwg/fetch] Allow `new Response` with 101 status code (Issue #1759)

### What is the issue with the Fetch Standard?

Currently we say:

> If init["[status](https://fetch.spec.whatwg.org/#dom-responseinit-status)"] is not in the range 200 to 599, inclusive, then [throw](https://webidl.spec.whatwg.org/#dfn-throw) a [RangeError](https://webidl.spec.whatwg.org/#exceptiondef-rangeerror).

A request was recently made to Node.js to support status 101 when initializing requests, i.e. `new Response(null, { status: 101 })`.

This is because people use `Response` in server runtimes to indicate well... a response 😅  

On the service worker front, I'm not sure how this would be useful outside of testing (but it'd be useful there).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1759
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1759@github.com>

Received on Sunday, 9 June 2024 09:33:28 UTC