Level sets dependency graph to consume etcd 3.1.5
This commit is contained in:
12
vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go
generated
vendored
12
vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go
generated
vendored
@@ -15,8 +15,12 @@ import (
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
const metadataHeaderPrefix = "Grpc-Metadata-"
|
||||
const metadataTrailerPrefix = "Grpc-Trailer-"
|
||||
// MetadataHeaderPrefix is prepended to HTTP headers in order to convert them to
|
||||
// gRPC metadata for incoming requests processed by grpc-gateway
|
||||
const MetadataHeaderPrefix = "Grpc-Metadata-"
|
||||
// MetadataTrailerPrefix is prepended to gRPC metadata as it is converted to
|
||||
// HTTP headers in a response handled by grpc-gateway
|
||||
const MetadataTrailerPrefix = "Grpc-Trailer-"
|
||||
const metadataGrpcTimeout = "Grpc-Timeout"
|
||||
|
||||
const xForwardedFor = "X-Forwarded-For"
|
||||
@@ -52,8 +56,8 @@ func AnnotateContext(ctx context.Context, req *http.Request) (context.Context, e
|
||||
pairs = append(pairs, "authorization", val)
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(key, metadataHeaderPrefix) {
|
||||
pairs = append(pairs, key[len(metadataHeaderPrefix):], val)
|
||||
if strings.HasPrefix(key, MetadataHeaderPrefix) {
|
||||
pairs = append(pairs, key[len(MetadataHeaderPrefix):], val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user