1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 commonLowerHeader = map[string]string{} // Go-Canonical-Case -> lower-case
14 commonCanonHeader = map[string]string{} // lower-case -> Go-Canonical-Case
18 for _, v := range []string{
25 "access-control-allow-origin",
29 "content-disposition",
46 "if-unmodified-since",
52 "proxy-authorization",
59 "strict-transport-security",
67 chk := http.CanonicalHeaderKey(v)
68 commonLowerHeader[chk] = v
69 commonCanonHeader[v] = chk
73 func lowerHeader(v string) string {
74 if s, ok := commonLowerHeader[v]; ok {
77 return strings.ToLower(v)