Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for domainAndType (0.18 sec)

  1. src/net/http/cookiejar/jar.go

    // Go's time.Time) and should be far enough in the future.
    var endOfTime = time.Date(9999, 12, 31, 23, 59, 59, 0, time.UTC)
    
    // domainAndType determines the cookie's domain and hostOnly attribute.
    func (j *Jar) domainAndType(host, domain string) (string, bool, error) {
    	if domain == "" {
    		// No domain attribute in the SetCookie header indicates a
    		// host cookie.
    		return host, true, nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. src/net/http/cookiejar/jar_test.go

    	{"co.uk", ".co.uk", "co.uk", true, nil},
    }
    
    func TestDomainAndType(t *testing.T) {
    	jar := newTestJar()
    	for _, tc := range domainAndTypeTests {
    		domain, hostOnly, err := jar.domainAndType(tc.host, tc.domain)
    		if err != tc.wantErr {
    			t.Errorf("%q/%q: got %q error, want %v",
    				tc.host, tc.domain, err, tc.wantErr)
    			continue
    		}
    		if err != nil {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 34K bytes
    - Viewed (0)
Back to top