-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Description
While reading http.TimeoutHandler
implementation I noticed that in current docs there's no mention that all writes in the response are buffered in memory before being flushed to the client.
Digging a bit in the git history, this was a clarification that was present on the original implementation.
The last change that touched the docs has a good summary of some back and forth in implementing Flusher
, which docs changes made this original note be lost.
It feels to me that clarifying that all writes are buffered to memory is something worth adding again since that should be considered by users when wrapping handlers that might produce big writes.
The proposed new docs for that paragraph could be:
// TimeoutHandler buffers all Handler writes to memory.
// It supports the Pusher interface but does not support the Hijacker
// or Flusher interfaces.
If that sounds like a good idea, I can create a CL with this change.
Activity
seankhliao commentedon Aug 23, 2021
cc @neild
gopherbot commentedon Aug 28, 2021
Change https://golang.org/cl/345795 mentions this issue:
net/http: clarify TimeoutHandler buffer writes to memory