File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,10 @@ type ResponseWriter interface {
94
94
// The Flusher interface is implemented by ResponseWriters that allow
95
95
// an HTTP handler to flush buffered data to the client.
96
96
//
97
+ // The default HTTP/1.x and HTTP/2 ResponseWriter implementations
98
+ // support Flusher, but ResponseWriter wrappers may not. Handlers
99
+ // should always test for this ability at runtime.
100
+ //
97
101
// Note that even for ResponseWriters that support Flush,
98
102
// if the client is connected through an HTTP proxy,
99
103
// the buffered data may not reach the client until the response
@@ -105,6 +109,11 @@ type Flusher interface {
105
109
106
110
// The Hijacker interface is implemented by ResponseWriters that allow
107
111
// an HTTP handler to take over the connection.
112
+ //
113
+ // The default ResponseWriter for HTTP/1.x connections supports
114
+ // Hijacker, but HTTP/2 connections intentionally do not.
115
+ // ResponseWriter wrappers may also not support Hijacker. Handlers
116
+ // should always test for this ability at runtime.
108
117
type Hijacker interface {
109
118
// Hijack lets the caller take over the connection.
110
119
// After a call to Hijack(), the HTTP server library
You can’t perform that action at this time.
0 commit comments