Use SetHeader instead of SendHeader

Signed-off-by: Mustafa Gezen <mustafa@ctrliq.com>
This commit is contained in:
Mustafa Gezen 2022-08-26 22:55:17 +02:00
parent eeaced0b14
commit b89ddeb62f
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ func (s *Server) GetBlob(ctx context.Context, req *yumrepofspb.GetBlobRequest) (
} }
header := metadata.Pairs("Location", urlStr) header := metadata.Pairs("Location", urlStr)
err = grpc.SendHeader(ctx, header) err = grpc.SetHeader(ctx, header)
if err != nil { if err != nil {
s.log.Errorf("failed to send header: %v", err) s.log.Errorf("failed to send header: %v", err)
return nil, status.Error(codes.Internal, "failed to send header") return nil, status.Error(codes.Internal, "failed to send header")

View File

@ -79,7 +79,7 @@ func (s *Server) GetRpm(ctx context.Context, req *yumrepofspb.GetRpmRequest) (*y
} }
header := metadata.Pairs("Location", urlStr) header := metadata.Pairs("Location", urlStr)
err = grpc.SendHeader(ctx, header) err = grpc.SetHeader(ctx, header)
if err != nil { if err != nil {
s.log.Errorf("failed to send header: %v", err) s.log.Errorf("failed to send header: %v", err)
return nil, status.Error(codes.Internal, "failed to send header") return nil, status.Error(codes.Internal, "failed to send header")