diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index e3f363192cc..db76cbf5fe6 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -2446,6 +2446,8 @@ class ClientChannel::LoadBalancedCall::Metadata void Encode(GrpcTimeoutMetadata, grpc_millis) {} void Encode(HttpPathMetadata, const Slice&) {} + void Encode(HttpMethodMetadata, + const typename HttpMethodMetadata::ValueType&) {} std::vector> Take() { return std::move(out_); diff --git a/src/core/ext/filters/http/server/http_server_filter.cc b/src/core/ext/filters/http/server/http_server_filter.cc index 77a75ae093a..789769849d2 100644 --- a/src/core/ext/filters/http/server/http_server_filter.cc +++ b/src/core/ext/filters/http/server/http_server_filter.cc @@ -120,7 +120,7 @@ static grpc_error_handle hs_filter_incoming_metadata(grpc_call_element* elem, grpc_error_handle error = GRPC_ERROR_NONE; static const char* error_name = "Failed processing incoming headers"; - auto method = b->Take(grpc_core::HttpMethodMetadata()); + auto method = b->get(grpc_core::HttpMethodMetadata()); if (method.has_value()) { switch (*method) { case grpc_core::HttpMethodMetadata::kPost: diff --git a/src/core/lib/security/transport/server_auth_filter.cc b/src/core/lib/security/transport/server_auth_filter.cc index 9bdf6077d54..8bd0541a9b5 100644 --- a/src/core/lib/security/transport/server_auth_filter.cc +++ b/src/core/lib/security/transport/server_auth_filter.cc @@ -108,6 +108,9 @@ class ArrayEncoder { grpc_core::Slice(Which::Encode(value))); } + void Encode(grpc_core::HttpMethodMetadata, + const typename grpc_core::HttpMethodMetadata::ValueType&) {} + private: void Add(grpc_core::Slice key, grpc_core::Slice value) { if (array_->count == array_->capacity) {