Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for canonicalMIMEHeaderKey (0.24 sec)

  1. src/net/textproto/reader_test.go

    	commonHeaderOnce.Do(initCommonHeader)
    	for h := range commonHeader {
    		if h != CanonicalMIMEHeaderKey(h) {
    			t.Errorf("Non-canonical header %q in commonHeader", h)
    		}
    	}
    	b := []byte("content-Length")
    	want := "Content-Length"
    	n := testing.AllocsPerRun(200, func() {
    		if x, _ := canonicalMIMEHeaderKey(b); x != want {
    			t.Fatalf("canonicalMIMEHeaderKey(%q) = %q; want %q", b, x, want)
    		}
    	})
    	if n > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 05 18:31:56 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  2. src/net/textproto/reader.go

    // returned without modifications.
    func CanonicalMIMEHeaderKey(s string) string {
    	// Quick check for canonical encoding.
    	upper := true
    	for i := 0; i < len(s); i++ {
    		c := s[i]
    		if !validHeaderFieldByte(c) {
    			return s
    		}
    		if upper && 'a' <= c && c <= 'z' {
    			s, _ = canonicalMIMEHeaderKey([]byte(s))
    			return s
    		}
    		if !upper && 'A' <= c && c <= 'Z' {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  3. src/net/mail/message.go

    		if kv == "" {
    			return m, err
    		}
    
    		// Key ends at first colon.
    		k, v, ok := strings.Cut(kv, ":")
    		if !ok {
    			return m, errors.New("malformed header line: " + kv)
    		}
    		key := textproto.CanonicalMIMEHeaderKey(k)
    
    		// Permit empty key, because that is what we did in the past.
    		if key == "" {
    			continue
    		}
    
    		// Skip initial spaces in value.
    		value := strings.TrimLeft(v, " \t")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:31:03 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  4. internal/bucket/object/lock/lock.go

    	// users to provide RFC 3339 compliant dates.
    	retDate, err = amztime.ISO8601Parse(dateStr)
    	if err != nil {
    		return rmode, r, ErrInvalidRetentionDate
    	}
    	_, replReq := h[textproto.CanonicalMIMEHeaderKey(xhttp.MinIOSourceReplicationRequest)]
    
    	t, err := UTCNowNTP()
    	if err != nil {
    		lockLogIf(context.Background(), err)
    		return rmode, r, ErrPastObjectLockRetainDate
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top