This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new fdd242e  Update HttpClientExecuteInterceptor.java (#5283)
fdd242e is described below

commit fdd242edb06336de2ab57522d0896356d5d8e624
Author: whfjam <[email protected]>
AuthorDate: Mon Aug 10 13:41:31 2020 +0800

    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 <[email protected]>
---
 .../apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
 
b/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
index aa86e53..1144dd3 100644
--- 
a/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
+++ 
b/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
@@ -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());
         }
     }
 

Reply via email to