x/net/http2: client stream left unclosed after response status >=300 #48610
On receiving a 3xx, 4xx, 5xx, etc. response while writing a request body, the HTTP/2 RoundTrip cancels the body write and returns:
In this case, the client does nothing to terminate its side of the stream--it doesn't send END_STREAM or RST_STREAM. The stream will remain open or in a half-closed state until the server resets it.
In addition, we remove the stream from
We should either send a RST_STREAM when we've given up writing, or write the request body even on a 3xx etc response. (The server can still reset the stream if it doesn't care about the body.)
The text was updated successfully, but these errors were encountered:
Hm, this is trickier than I thought.
I was mistaken about us removing the stream from
So a client-initiated stream is left unclosed if:
I haven't found a way to demonstrate this condition with the