Commit d583ca76 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: clarify that ReadRequest is only for HTTP/1.x

Fixes #25476

Change-Id: I5a81cdf7d0ef9a22b0267732f27bcc2ef76eaa29
Reviewed-on: https://go-review.googlesource.com/113817Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
parent 64a832de
......@@ -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)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment