diff options
author | David G. Quintas <dgq@google.com> | 2017-02-03 08:04:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-03 08:04:07 -0800 |
commit | f538e15ca53f6c1118286c240f1cb2a9aeb1aef5 (patch) | |
tree | 40d32ac80c597400b3c51e0a88bd9dd8b7b5b00d | |
parent | fbe0cf27f1711c167839987d41f078de65b4759a (diff) | |
parent | e985cf57c24a15f50906e44cb93c067711f78be7 (diff) |
Merge pull request #9572 from dgquintas/interop_server_mac_slice_crash
Fixed invalid handling of slice data in interop_server
-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())); } } } |