File tree 1 file changed +10
-1
lines changed
pkg/apis/cluster/v1alpha1
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,8 @@ var (
202
202
203
203
type proxyResponseWriter struct {
204
204
http.ResponseWriter
205
+ http.Hijacker
206
+ http.Flusher
205
207
statusCode int
206
208
}
207
209
@@ -210,8 +212,15 @@ func (in *proxyResponseWriter) WriteHeader(statusCode int) {
210
212
in .ResponseWriter .WriteHeader (statusCode )
211
213
}
212
214
215
+ func newProxyResponseWriter (_writer http.ResponseWriter ) * proxyResponseWriter {
216
+ writer := & proxyResponseWriter {ResponseWriter : _writer , statusCode : http .StatusOK }
217
+ writer .Hijacker , _ = _writer .(http.Hijacker )
218
+ writer .Flusher , _ = _writer .(http.Flusher )
219
+ return writer
220
+ }
221
+
213
222
func (p * proxyHandler ) ServeHTTP (_writer http.ResponseWriter , request * http.Request ) {
214
- writer := & proxyResponseWriter { _writer , http . StatusOK }
223
+ writer := newProxyResponseWriter ( _writer )
215
224
defer func () {
216
225
p .finishFunc (writer .statusCode )
217
226
}()
You can’t perform that action at this time.
0 commit comments