From e985cf57c24a15f50906e44cb93c067711f78be7 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 2 Feb 2017 19:19:01 -0800 Subject: Fixed invalid handling of slice data in interop_server --- test/cpp/interop/interop_server.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc index 77e309dde4..5a810b45ef 100644 --- a/test/cpp/interop/interop_server.cc +++ b/test/cpp/interop/interop_server.cc @@ -106,7 +106,9 @@ void MaybeEchoMetadata(ServerContext* context) { if (iter != client_metadata.end()) { iter = client_metadata.find("user-agent"); if (iter != client_metadata.end()) { - context->AddInitialMetadata(kEchoUserAgentKey, iter->second.data()); + context->AddInitialMetadata( + kEchoUserAgentKey, + grpc::string(iter->second.begin(), iter->second.end())); } } } -- cgit v1.2.3