Skip to content

Commit

Permalink
reverseproxy: flush response header immediately if flushInterval<0
Browse files Browse the repository at this point in the history
  • Loading branch information
WJTian committed Sep 19, 2019
1 parent ef771a1 commit 4567662
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bfe_server/reverseproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,10 @@ func (p *ReverseProxy) copyResponse(dst io.Writer, src io.ReadCloser,

if flushInterval < 0 {
if wf, ok := dst.(bfe_http.WriteFlusher); ok {
// Note: Flush response header immediately
if err := wf.Flush(); err != nil {
return err
}
_, err := bfe_util.CopyWithoutBuffer(wf, src)
return err
}
Expand Down

0 comments on commit 4567662

Please sign in to comment.