blob: c2805f6ac4d53394e6bae0a0dfb0b0f5b03c224f [file] [log] [blame]
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package http2
import (
var (
commonLowerHeader = map[string]string{} // Go-Canonical-Case -> lower-case
commonCanonHeader = map[string]string{} // lower-case -> Go-Canonical-Case
func init() {
for _, v := range []string{
} {
chk := http.CanonicalHeaderKey(v)
commonLowerHeader[chk] = v
commonCanonHeader[v] = chk
func lowerHeader(v string) string {
if s, ok := commonLowerHeader[v]; ok {
return s
return strings.ToLower(v)