Skip to content

Commit

Permalink
Add reference to spec for GRPC -bin metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphire-janrain committed Aug 21, 2023
1 parent 8e049d2 commit c7c7ae6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/modules/k6/grpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@ func (c *Client) parseInvokeParams(paramsVal goja.Value) (*invokeParams, error)
// TODO(rogchap): Should we manage a string slice?
strval, ok := kv.(string)
if !ok {
// The spec defines that Binary-valued keys end in -bin
// https://grpc.io/docs/what-is-grpc/core-concepts/#metadata
if strings.HasSuffix(hk, "-bin") {
binval, ok := kv.([]byte)
if !ok {
Expand Down

0 comments on commit c7c7ae6

Please sign in to comment.