Re: [whatwg/fetch] 421 and upload streams (#982)

I'm not expert on the mechanics of sockets, but if we write and the socket is half-closed by the other end, without reading from it, my recollection is we tend to get connection resets, as opposed connection closed notifications.  This behavior is observed across all platforms.

Once Windows notifies a consumer of a connection reset, you can no longer read from the socket, even if there was a 421 response pending.  So just trying to read from a socket after uploading the request body fails, which would be much simpler than supporting full duplex sockets, won't give us a 421 response on Windows.  On other platforms, we do actually read from the body on connection resets of upload attempts, and return 4xx/5xx responses, if we get them.

Note that this only applies to H1, I'm not sure what H2/QUIC do in this case, or if they even have an analog of half-closed sockets.

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

Received on Monday, 20 July 2020 20:10:05 UTC