Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gregns1 committed Jan 7, 2025
1 parent 0655f59 commit 9f9fd77
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions rest/counted_response_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,5 @@ func (w *CountedResponseWriter) isHijackable() bool {
}

func (w *CountedResponseWriter) Flush() {
f, _ := w.writer.(http.Flusher)
f.Flush()
w.writer.(http.Flusher).Flush()
}
3 changes: 1 addition & 2 deletions rest/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1607,8 +1607,7 @@ func (h *handler) writeMultipart(subtype string, callback func(*multipart.Writer
}

func (h *handler) flush() {
r, _ := h.response.(http.Flusher)
r.Flush()
h.response.(http.Flusher).Flush()
}

// If the error parameter is non-nil, sets the response status code appropriately and
Expand Down
3 changes: 1 addition & 2 deletions rest/non_counted_response_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@ func (w *NonCountedResponseWriter) isHijackable() bool {
}

func (w *NonCountedResponseWriter) Flush() {
f, _ := w.ResponseWriter.(http.Flusher)
f.Flush()
w.ResponseWriter.(http.Flusher).Flush()
}

0 comments on commit 9f9fd77

Please sign in to comment.