diff options
author | David Garcia Quintas <dgq@google.com> | 2017-02-02 19:19:01 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2017-02-02 19:19:01 -0800 |
commit | e985cf57c24a15f50906e44cb93c067711f78be7 (patch) | |
tree | 6155d0ae965df194a7c97b005ee795b7562aa5e2 /test/cpp | |
parent | 26623b3d77ae78e66f66b996593acf57a7cf1197 (diff) |
Fixed invalid handling of slice data in interop_server
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/interop/interop_server.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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())); } } } |