Skip to content

Commit 42b1186

Browse files
committed
http2: support ResponseController.EnableFullDuplex
The ResponseController.EnableFullDuplex method indicates that an HTTP handler intends to interleave reads from a request body with writes to the response body. Add an EnableFullDuplex method to the ResponseWriter so we don't return a not-supported error. The HTTP/2 server always supports full duplex, so this is a no-op. For golang/go#57786 Change-Id: I6529e6ce01d59b8b48fb67ba7c244255df57c174 Reviewed-on: https://go-review.googlesource.com/c/net/+/472717 Reviewed-by: Cherry Mui <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Дарья Бочкар <[email protected]>
1 parent 6cc5ac4 commit 42b1186

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

http2/server.go

+5
Original file line numberDiff line numberDiff line change
@@ -2880,6 +2880,11 @@ func (w *responseWriter) SetWriteDeadline(deadline time.Time) error {
28802880
return nil
28812881
}
28822882

2883+
func (w *responseWriter) EnableFullDuplex() error {
2884+
// We always support full duplex responses, so this is a no-op.
2885+
return nil
2886+
}
2887+
28832888
func (w *responseWriter) Flush() {
28842889
w.FlushError()
28852890
}

0 commit comments

Comments
 (0)