Commit c522b2be authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: document that after Hijack, Request.Body is invalid

We can make it panic with a more explicit and readable error message
during Go 1.10, but document it for now. This has always been the
case; it's not a new rule.

Updates #20933

Change-Id: I53c1fefb47a8f4aae0bb32fa742afa3a2ed20e8a
Reviewed-on: https://go-review.googlesource.com/50634Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
parent ace7ce10
......@@ -178,6 +178,9 @@ type Hijacker interface {
//
// The returned bufio.Reader may contain unprocessed buffered
// data from the client.
//
// After a call to Hijack, the original Request.Body should
// not be used.
Hijack() (net.Conn, *bufio.ReadWriter, error)
}
......
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