[whatwg/fetch] Empty statusText does not match the reason-phrase token production (Issue #1794)

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

In [initialize a response](https://fetch.spec.whatwg.org/#initialize-a-response) algorithm:
> 2. If init["statusText"] does not match the reason-phrase token production, then throw a TypeError.

but [reason-phrase](https://httpwg.org/specs/rfc9112.html#status.line) token production required 1 or more characters:

> reason-phrase  = 1*( HTAB / SP / VCHAR / obs-text )

so if `init["statusText"]` is a empty string "", this step would be fail.

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

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

Received on Wednesday, 11 December 2024 18:17:56 UTC