aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/http/request.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net/http/request.go b/src/net/http/request.go
index a27d13cb98..b191d519f2 100644
--- a/src/net/http/request.go
+++ b/src/net/http/request.go
@@ -329,6 +329,8 @@ var ErrNoCookie = errors.New("http: named cookie not present")
// Cookie returns the named cookie provided in the request or
// ErrNoCookie if not found.
+// If multiple cookies match the given name, only one cookie will
+// be returned.
func (r *Request) Cookie(name string) (*Cookie, error) {
for _, c := range readCookies(r.Header, name) {
return c, nil