Skip to content

Response body being null on 204/205/304 etc doesn't match any implementation #1779

Open
@noamr

Description

What is the issue with the Fetch Standard?

As per the standard, Response.body returns null if the body is null, https://fetch.spec.whatwg.org/#dom-body-body and https://fetch.spec.whatwg.org/#ref-for-null-body-status. However, no browser implements this. In all the implementations, a 204/205/304 response etc. would result in a Response.body of an empty stream.

Perhaps the fetch spec should be fixed to reflect implemented reality?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions