[VOL-4290] Voltha go library updates for gRPC migration
Change-Id: I1aa2774beb6b7ed7419bc45aeb53fcae8a8ecda0
diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/nicemd.go b/vendor/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/nicemd.go
index a277bee..1c60585 100644
--- a/vendor/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/nicemd.go
+++ b/vendor/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/nicemd.go
@@ -4,9 +4,9 @@
package metautils
import (
+ "context"
"strings"
- "golang.org/x/net/context"
"google.golang.org/grpc/metadata"
)
@@ -49,7 +49,7 @@
found = true
} else {
for _, allowedKey := range copiedKeys {
- if strings.ToLower(allowedKey) == strings.ToLower(k) {
+ if strings.EqualFold(allowedKey, k) {
found = true
break
}
@@ -83,7 +83,7 @@
//
// The function is binary-key safe.
func (m NiceMD) Get(key string) string {
- k, _ := encodeKeyValue(key, "")
+ k := strings.ToLower(key)
vv, ok := m[k]
if !ok {
return ""
@@ -98,7 +98,7 @@
// The function is binary-key safe.
func (m NiceMD) Del(key string) NiceMD {
- k, _ := encodeKeyValue(key, "")
+ k := strings.ToLower(key)
delete(m, k)
return m
}
@@ -109,8 +109,8 @@
//
// The function is binary-key safe.
func (m NiceMD) Set(key string, value string) NiceMD {
- k, v := encodeKeyValue(key, value)
- m[k] = []string{v}
+ k := strings.ToLower(key)
+ m[k] = []string{value}
return m
}
@@ -120,7 +120,7 @@
//
// The function is binary-key safe.
func (m NiceMD) Add(key string, value string) NiceMD {
- k, v := encodeKeyValue(key, value)
- m[k] = append(m[k], v)
+ k := strings.ToLower(key)
+ m[k] = append(m[k], value)
return m
}