Update HttpClientExecuteInterceptor.java (#5283)

use the  method httpMethod.setRequestHeader to set the new skywalking headers,so that it can override the exits headers if there is any

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
This commit is contained in:
whfjam 2020-08-10 13:41:31 +08:00 committed by GitHub
parent 69297b9ec6
commit fdd242edb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public class HttpClientExecuteInterceptor implements InstanceMethodsAroundInterc
for (CarrierItem next = contextCarrier.items(); next.hasNext(); ) {
next = next.next();
httpMethod.addRequestHeader(next.getHeadKey(), next.getHeadValue());
httpMethod.setRequestHeader(next.getHeadKey(), next.getHeadValue());
}
}