[Webkit-unassigned] [Bug 236582] Response.body is not null for fetch responses with null status codes or HEAD methods

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 14 09:12:27 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=236582

Anne van Kesteren <annevk at annevk.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugzilla.mozilla.or
                   |                            |g/show_bug.cgi?id=1755277

--- Comment #2 from Anne van Kesteren <annevk at annevk.nl> ---
I think for some of these, e.g., `HEAD` there's no way to include a body, but there might not be a general way to exclude a body? At least not in HTTP/1. 

And the specification mandates browser behavior as far as I know. I think even if the server included a response body for a 204 response, the browser would drop it. The question is whether that results in the empty byte sequence as body, or lack of body.

In browsers the API can return null in a number of cases, but not when it's a server-generated response as you say. I would be somewhat okay with standardizing upon that behavior. It shouldn't be too hard to change null to the empty byte sequence in a couple of places. Still unfortunate that we didn't define a Response to always have a body from the onset, but it might be too late for that now?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220214/387c3402/attachment-0001.htm>


More information about the webkit-unassigned mailing list