Skip to content

Commit

Permalink
fix: fix request headers for AuthorizedViews
Browse files Browse the repository at this point in the history
Change-Id: I5dc6c0c79067903fe5c71c0f9d51e40d3f5233ca
  • Loading branch information
trollyxia committed Mar 11, 2024
1 parent 73037c0 commit e2b3a13
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bigtable/bigtable.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ func (c *Client) requestParamsHeaderValue(table string) string {
return fmt.Sprintf("table_name=%s&app_profile_id=%s", url.QueryEscape(c.fullTableName(table)), url.QueryEscape(c.appProfile))
}

func (c *Client) requestParamsHeaderValueForAuthorizedView(table string, authorizedView string) string {
return fmt.Sprintf("authorized_view_name=%s&app_profile_id=%s", url.QueryEscape(c.fullAuthorizedViewName(table, authorizedView)), url.QueryEscape(c.appProfile))
}

// mergeOutgoingMetadata returns a context populated by the existing outgoing
// metadata merged with the provided mds.
func mergeOutgoingMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
Expand Down Expand Up @@ -207,7 +203,7 @@ func (c *Client) OpenAuthorizedView(table, authorizedView string) TableApi {
table: table,
md: metadata.Join(metadata.Pairs(
resourcePrefixHeader, c.fullAuthorizedViewName(table, authorizedView),
requestParamsHeader, c.requestParamsHeaderValueForAuthorizedView(table, authorizedView),
requestParamsHeader, c.requestParamsHeaderValue(table),
), btopt.WithFeatureFlags()),
authorizedView: authorizedView,
}}
Expand Down

0 comments on commit e2b3a13

Please sign in to comment.