You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2020/08/10 05:41:47 UTC
[skywalking] branch master updated: Update
HttpClientExecuteInterceptor.java (#5283)
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 <45...@users.noreply.github.com>
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 <wu...@foxmail.com>
---
.../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());
}
}