grpc / grpc-dart

The Dart language implementation of gRPC.
https://pub.dev/packages/grpc
Apache License 2.0
861 stars 271 forks source link

Missing support for duplicate header keys containing different values #627

Open paul678 opened 1 year ago

paul678 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Any updates on this issue?

mosuem commented 1 year ago

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

pawelpetruch commented 3 months ago

@mosuem - are there any updates?

mosuem commented 3 months ago

Not yet - too much on the todo list..