Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observable FeignContext with immutable Headers #2438

Open
johnnywiller opened this issue Jun 3, 2024 · 0 comments
Open

Observable FeignContext with immutable Headers #2438

johnnywiller opened this issue Jun 3, 2024 · 0 comments

Comments

@johnnywiller
Copy link

FeignContext enriches the headers providing Propagator.Setter<C> as of Request::header which modifies the headers in place as opposed to make an immutable copy.

In our case the underlining Feign Request is coming with the headers immutable. The headers were created with Collections.unmodifiableMap(headers) by an underlining library which rewrites the request.

Upon trying to enrich the header with the trace ids we face java.lang.UnsupportedOperationException.

Did you encounter this issue before, have you consider not changing headers in place and instead to a immutable copy of the Map<String, Collection<String>> headers; object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant