The ResponseWriters defined in rest.handler add Flush interface. (#318)
This commit is contained in:
@@ -95,6 +95,12 @@ func (w *cryptionResponseWriter) WriteHeader(statusCode int) {
|
||||
w.ResponseWriter.WriteHeader(statusCode)
|
||||
}
|
||||
|
||||
func (w *cryptionResponseWriter) Flush() {
|
||||
if flusher, ok := w.ResponseWriter.(http.Flusher); ok {
|
||||
flusher.Flush()
|
||||
}
|
||||
}
|
||||
|
||||
func (w *cryptionResponseWriter) flush(key []byte) {
|
||||
if w.buf.Len() == 0 {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user