diff --git a/src/net/http/request.go b/src/net/http/request.go index 997169ce69..194b867c8c 100644 --- a/src/net/http/request.go +++ b/src/net/http/request.go @@ -911,6 +911,11 @@ func putTextprotoReader(r *textproto.Reader) { } // ReadRequest reads and parses an incoming request from b. +// +// ReadRequest is a low-level function and should only be used for +// specialized applications; most code should use the Server to read +// requests and handle them via the Handler interface. ReadRequest +// only supports HTTP/1.x requests. For HTTP/2, use golang.org/x/net/http2. func ReadRequest(b *bufio.Reader) (*Request, error) { return readRequest(b, deleteHostHeader) }