grpc-dart icon indicating copy to clipboard operation
grpc-dart copied to clipboard

Missing support for duplicate header keys containing different values

Open paul678 opened this issue 2 years ago • 5 comments

We are consuming data from a gRPC backend written with go-grpc. On the server side we have implemented a way to send pack key information inside the trailer metadata which according to this documentation is a map from string to a list of strings.

On the dart client side we where expecting to get all the information placed in that map but found out that the key we where puting info in only contained a single string value after it was received by the dart client. After some digging around we concluded the server implementation is valid and tracked the issue down to a TODO here.

This basically means than if we place multiple strings on the server side we will only map the last one since on Dart we are exposing Map<String, String> in turn breaking our implementation.

paul678 avatar May 16 '23 10:05 paul678

Just in case anyone needs it: based on our own customised needs we have forked and fixed the issue here. For now we have not submitted a PR because I'm personally not sure if our fix is following grpc docs or if it's even similar to how this case is covered by other grpc client implementations 🤔

paul678 avatar May 16 '23 14:05 paul678

Any updates on this issue?

paul678 avatar Aug 31 '23 07:08 paul678

Not yet; I can take a look at how to do a non-breaking implementation of this.

mosuem avatar Aug 31 '23 07:08 mosuem

@mosuem - are there any updates?

pawelpetruch avatar Aug 22 '24 08:08 pawelpetruch

Not yet - too much on the todo list..

mosuem avatar Aug 22 '24 08:08 mosuem