diff options
Diffstat (limited to 'src/pkg/net/http/jar.go')
-rw-r--r-- | src/pkg/net/http/jar.go | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/pkg/net/http/jar.go b/src/pkg/net/http/jar.go index 2c2caa251..5c3de0dad 100644 --- a/src/pkg/net/http/jar.go +++ b/src/pkg/net/http/jar.go @@ -8,23 +8,20 @@ import ( "net/url" ) -// A CookieJar manages storage and use of cookies in HTTP requests. +// A CookieJar manages storage and use of cookies in HTTP requests. // // Implementations of CookieJar must be safe for concurrent use by multiple // goroutines. +// +// The net/http/cookiejar package provides a CookieJar implementation. type CookieJar interface { - // SetCookies handles the receipt of the cookies in a reply for the - // given URL. It may or may not choose to save the cookies, depending - // on the jar's policy and implementation. + // SetCookies handles the receipt of the cookies in a reply for the + // given URL. It may or may not choose to save the cookies, depending + // on the jar's policy and implementation. SetCookies(u *url.URL, cookies []*Cookie) // Cookies returns the cookies to send in a request for the given URL. - // It is up to the implementation to honor the standard cookie use - // restrictions such as in RFC 6265. + // It is up to the implementation to honor the standard cookie use + // restrictions such as in RFC 6265. Cookies(u *url.URL) []*Cookie } - -type blackHoleJar struct{} - -func (blackHoleJar) SetCookies(u *url.URL, cookies []*Cookie) {} -func (blackHoleJar) Cookies(u *url.URL) []*Cookie { return nil } |