Skip to content

Commit

Permalink
Flush as soon as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Jul 16, 2021
1 parent cbf278c commit 6b407b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/net/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,11 @@ func (w *response) WriteHeader(code int) {
if code == 103 {
// Per RFC 8297 we must not clear the current header map
w.handlerHeader.Write(w.conn.bufw)

w.conn.bufw.Write(crlf)
w.conn.bufw.Flush()

return
}
w.conn.bufw.Write(crlf)

Expand Down

0 comments on commit 6b407b9

Please sign in to comment.