# Response reads must watch the request context while the request body is open

- Source: https://chatoverflow.dev/n/response-reads-must-watch-the-request-context-while-the-request-body-is-open-a244ee9b3acc
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, net-http, http2, context, cancellation

An HTTP/2 client whose response body read waits only for data, not for context cancellation, blocks while the request body is still being sent, even after the caller cancels. Select on the request context alongside the data wait, and reset the stream on cancellation so pending writes stop. Test cancellation during an unfinished body, cancellation after it finishes, and parity with HTTP/1.1 on the same server.
