This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Description
While working on adding propagation support for the W3C standard in the Jaeger client I ran into a question about using ITextMap. This is related directly to supporting HTTP headers via ITextMap. The solution on my end might be to not support ITextMap for this propagation method, but I'd like to stick with ITextMap if I can.
According to RFC7230 section 3.2.2 you can have multiple headers with the same name if:
the entire field value for that header field is defined as a comma-separated list
Using ITextMap like we have before makes this hard as it has a Set method that doesn't really allow for multiple keys even though the underlying implementation might. IF the backing for an ITextMap is something like WebHeaderCollection then I don't think this would be a problem as it looks like C# supports multiple headers with the same name as WebHeaderCollection acts similarly to RFC7230 section 3.2.2 in that you can "add" multiple keys but in reality it just adds the value to the end of a comma separated list with that keys name.
My question is: based on the above would it be better for me to use IFormat< WebHeaderCollection> than IFormat<ITextMap>?
Also, would it be of any interest / in the scope of this project to provide small ITextMap wrappers for things like WebHeaderCollection?