I'm trying to develop a custom context mapper for a REST binding and hitting an issue with setting header values. Let's say I want to add the header "foo" to a reply with a value of "123". The following code should get that done:
I do end up with a header named "foo", but unfortunately the value is "" and not "123". I believe this is due to the use of CaseInsensitiveMap underneath the covers which use List<String> as the value of the map. This turns out to be a problem in the EndpointProxy logic which maps the BindingData headers to the response builder:
Note that the header being added here is a List<String> instead of a String.