You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining some configuration using the default client all the clients share the same "default request headers" with the merge of all configurations.
IMO the problem was introduced by the commit 2b07f21
Specifically by on line 328 by taking the default client defaultRequestHeaders and then on line 330 modifying with the defaultRequestHeaders from the specific client configuration if the clientConfig is not null.
In my tests I found that version 4.0.4 and 4.1.0 are not affected.
Sample code application.yaml
spring:
cloud:
openfeign:
client:
config:
default:
# could be any property as long as the *default* is not null on the configuration properties.logger-level: FULL testClientA:
default-request-headers:
x-custom-header: "from client A"testClientB:
default-request-headers:
x-custom-header: "from client B"
Spring Cloud version: 4.0.6
When defining some configuration using the default client all the clients share the same "default request headers" with the merge of all configurations.
IMO the problem was introduced by the commit 2b07f21
Specifically by on line 328 by taking the default client
defaultRequestHeaders
and then on line 330 modifying with thedefaultRequestHeaders
from the specific client configuration if theclientConfig
is notnull
.Actual code:
I believe that doing a deep copy of the map should be enough to fix.
Something like:
In my tests I found that version 4.0.4 and 4.1.0 are not affected.
Sample code
application.yaml
Controller.java
TestClientA.java
TestClientB.java
Tests.java
The text was updated successfully, but these errors were encountered: