Skip to content

Commit 2025fa7

Browse files
committed
Flush as soon as possible
1 parent a909313 commit 2025fa7

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
@@ -1157,6 +1157,11 @@ func (w *response) WriteHeader(code int) {
11571157
if code == 103 {
11581158
// Per RFC 8297 we must not clear the current header map
11591159
w.handlerHeader.Write(w.conn.bufw)
1160+
1161+
w.conn.bufw.Write(crlf)
1162+
w.conn.bufw.Flush()
1163+
1164+
return
11601165
}
11611166
w.conn.bufw.Write(crlf)
11621167

0 commit comments

Comments
 (0)