Merge pull request #3418 from jboeuf/fix_auth_md_processor_release-0_11

Do not use string_ref for output params.
pull/3413/head
Nicolas Noble 9 years ago
commit e1e9c54958
  1. 2
      include/grpc++/security/auth_metadata_processor.h
  2. 6
      test/cpp/end2end/end2end_test.cc

@ -45,7 +45,7 @@ namespace grpc {
class AuthMetadataProcessor {
public:
typedef std::multimap<grpc::string_ref, grpc::string_ref> InputMetadata;
typedef std::multimap<grpc::string, grpc::string_ref> OutputMetadata;
typedef std::multimap<grpc::string, grpc::string> OutputMetadata;
virtual ~AuthMetadataProcessor() {}

@ -136,9 +136,9 @@ class TestAuthMetadataProcessor : public AuthMetadataProcessor {
if (auth_md_value.ends_with(kGoodGuy)) {
context->AddProperty(kIdentityPropName, kGoodGuy);
context->SetPeerIdentityPropertyName(kIdentityPropName);
consumed_auth_metadata->insert(
std::make_pair(string(auth_md->first.data(), auth_md->first.length()),
auth_md->second));
consumed_auth_metadata->insert(std::make_pair(
string(auth_md->first.data(), auth_md->first.length()),
string(auth_md->second.data(), auth_md->second.length())));
return Status::OK;
} else {
return Status(StatusCode::UNAUTHENTICATED,

Loading…
Cancel
Save