From f32be5c79cc04a4ed95523715bad215edfd73493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 5 Mar 2021 10:54:52 +0100 Subject: [PATCH] improve docs --- src/net/http/server.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/net/http/server.go b/src/net/http/server.go index 0de9789cf8694e..94549740dbdf7d 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -154,10 +154,15 @@ type ResponseWriter interface { // times before sending the final header. // // If the passed status code is 103, the current content of the header - // map will be sent as early hints for the client. + // map will be sent immediatly as early hints for the client. // // The server automatically sends the 100-continue response header // when the Request.Body is read. + // + // Response headers may be buffered. In some cases (e.g. when using + // Resource Hints or Preload Link headers), sending headers to the + // client while the response is being generated can improve performance. + // To do so, use the Flusher interface. WriteHeader(statusCode int) }