- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for initCommonHeader (0.2 sec)
-
src/net/textproto/reader_test.go
} if err != nil && err.Error() != "550 "+wantMsg { t.Errorf("ReadResponse: error=%q, want %q", err.Error(), "550 "+wantMsg) } } func TestCommonHeaders(t *testing.T) { 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"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 05 18:31:56 UTC 2024 - 14.7K bytes - Viewed (0) -
src/net/textproto/reader.go
if upper && 'a' <= c && c <= 'z' { c -= toLower } else if !upper && 'A' <= c && c <= 'Z' { c += toLower } a[i] = c upper = c == '-' // for next time } commonHeaderOnce.Do(initCommonHeader) // The compiler recognizes m[string(byteSlice)] as a special // case, so a copy of a's bytes into a new string does not // happen in this map lookup: if v := commonHeader[string(a)]; v != "" { return v, true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 22.1K bytes - Viewed (0)