aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David G. Quintas <dgq@google.com>2017-02-03 08:04:07 -0800
committerGravatar GitHub <noreply@github.com>2017-02-03 08:04:07 -0800
commitf538e15ca53f6c1118286c240f1cb2a9aeb1aef5 (patch)
tree40d32ac80c597400b3c51e0a88bd9dd8b7b5b00d
parentfbe0cf27f1711c167839987d41f078de65b4759a (diff)
parente985cf57c24a15f50906e44cb93c067711f78be7 (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.cc4
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()));
}
}
}