~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/net/http/jar.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 14:06:23 UTC
  • mfrom: (14.1.23 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130820140623-b414jfxi3m0qkmrq
Tags: 2:1.1.2-2ubuntu1
* Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - d/control,control.cross: Update Breaks/Replaces for Ubuntu
    versions to ensure smooth upgrades, regenerate control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
        "net/url"
9
9
)
10
10
 
11
 
// A CookieJar manages storage and use of cookies in HTTP requests. 
 
11
// A CookieJar manages storage and use of cookies in HTTP requests.
12
12
//
13
13
// Implementations of CookieJar must be safe for concurrent use by multiple
14
14
// goroutines.
 
15
//
 
16
// The net/http/cookiejar package provides a CookieJar implementation.
15
17
type CookieJar interface {
16
 
        // SetCookies handles the receipt of the cookies in a reply for the 
17
 
        // given URL.  It may or may not choose to save the cookies, depending 
18
 
        // on the jar's policy and implementation. 
 
18
        // SetCookies handles the receipt of the cookies in a reply for the
 
19
        // given URL.  It may or may not choose to save the cookies, depending
 
20
        // on the jar's policy and implementation.
19
21
        SetCookies(u *url.URL, cookies []*Cookie)
20
22
 
21
23
        // Cookies returns the cookies to send in a request for the given URL.
22
 
        // It is up to the implementation to honor the standard cookie use 
23
 
        // restrictions such as in RFC 6265. 
 
24
        // It is up to the implementation to honor the standard cookie use
 
25
        // restrictions such as in RFC 6265.
24
26
        Cookies(u *url.URL) []*Cookie
25
27
}
26
 
 
27
 
type blackHoleJar struct{}
28
 
 
29
 
func (blackHoleJar) SetCookies(u *url.URL, cookies []*Cookie) {}
30
 
func (blackHoleJar) Cookies(u *url.URL) []*Cookie             { return nil }