Skip to content

Commit d781e9f

Browse files
committed
Flush as soon as possible
1 parent a532e72 commit d781e9f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/net/http/server.go

+5
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,11 @@ func (w *response) WriteHeader(code int) {
11541154
if code == 103 {
11551155
// Per RFC 8297 we must not clear the current header map
11561156
w.handlerHeader.Write(w.conn.bufw)
1157+
1158+
w.conn.bufw.Write(crlf)
1159+
w.conn.bufw.Flush()
1160+
1161+
return
11571162
}
11581163
w.conn.bufw.Write(crlf)
11591164

0 commit comments

Comments
 (0)