diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2018-05-29 19:45:34 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-05-29 20:35:07 +0000 |
commit | 39888635acd8fb7d54d1bec41262cf5861a5ebfd (patch) | |
tree | 52fcd6f2cfc9fa79ebebe521a481e54e0003de6f /src/net/http/request.go | |
parent | 479018150c0575d46495689315448f5524813ed5 (diff) | |
download | go-39888635acd8fb7d54d1bec41262cf5861a5ebfd.tar.gz go-39888635acd8fb7d54d1bec41262cf5861a5ebfd.zip |
net/http: document how Hijack and Request.Context interact
Fixes #22347
Change-Id: If86aa5d54cfd7a7c32d630fb2bf4f47e057dbfb2
Reviewed-on: https://go-review.googlesource.com/115039
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/net/http/request.go')
-rw-r--r-- | src/net/http/request.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/http/request.go b/src/net/http/request.go index 119a015a53..7c4325027c 100644 --- a/src/net/http/request.go +++ b/src/net/http/request.go @@ -316,7 +316,8 @@ type Request struct { // // For incoming server requests, the context is canceled when the // client's connection closes, the request is canceled (with HTTP/2), -// or when the ServeHTTP method returns. +// the ServeHTTP method returns, or if the Hijack method is +// called on the ResponseWriter. func (r *Request) Context() context.Context { if r.ctx != nil { return r.ctx |