Skip to content

Commit 6b407b9

Browse files
committed
Flush as soon as possible
1 parent cbf278c commit 6b407b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/net/http/server.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,11 @@ func (w *response) WriteHeader(code int) {
11341134
if code == 103 {
11351135
// Per RFC 8297 we must not clear the current header map
11361136
w.handlerHeader.Write(w.conn.bufw)
1137+
1138+
w.conn.bufw.Write(crlf)
1139+
w.conn.bufw.Flush()
1140+
1141+
return
11371142
}
11381143
w.conn.bufw.Write(crlf)
11391144

0 commit comments

Comments
 (0)