Skip to content

Commit

Permalink
ARROW-12746: [Go][Flight] append instead of overwriting outgoing meta…
Browse files Browse the repository at this point in the history
…data

Closes #10297 from zeroshade/flight-client-metadata

Authored-by: Matthew Topol <mtopol@factset.com>
Signed-off-by: Micah Kornfield <emkornfield@gmail.com>
  • Loading branch information
Matthew Topol authored and kszucs committed May 17, 2021
1 parent af476c6 commit 39dd06b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/arrow/flight/client_auth.go
Expand Up @@ -65,7 +65,7 @@ func createClientAuthUnaryInterceptor(auth ClientAuthHandler) grpc.UnaryClientIn
return status.Errorf(codes.Unauthenticated, "error retrieving token: %s", err)
}

return invoker(metadata.NewOutgoingContext(ctx, metadata.Pairs(grpcAuthHeader, tok)), method, req, reply, cc, opts...)
return invoker(metadata.AppendToOutgoingContext(ctx, grpcAuthHeader, tok), method, req, reply, cc, opts...)
}
}

Expand All @@ -86,6 +86,6 @@ func createClientAuthStreamInterceptor(auth ClientAuthHandler) grpc.StreamClient
return nil, status.Errorf(codes.Unauthenticated, "error retrieving token: %s", err)
}

return streamer(metadata.NewOutgoingContext(ctx, metadata.Pairs(grpcAuthHeader, tok)), desc, cc, method, opts...)
return streamer(metadata.AppendToOutgoingContext(ctx, grpcAuthHeader, tok), desc, cc, method, opts...)
}
}

0 comments on commit 39dd06b

Please sign in to comment.