You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2020/09/08 14:32:12 UTC

[httpcomponents-client] branch master updated: HTTPCLIENT-2115: HttpAsyncClientBuilder and H2AsyncClientBuilder fail to take `replaceExecInterceptor()` into account

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

olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git


The following commit(s) were added to refs/heads/master by this push:
     new feaa72e  HTTPCLIENT-2115: HttpAsyncClientBuilder and H2AsyncClientBuilder fail to take `replaceExecInterceptor()` into account
feaa72e is described below

commit feaa72e6e15748478a296ca859ffe5bdd776fb8e
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Tue Sep 8 16:30:08 2020 +0200

    HTTPCLIENT-2115: HttpAsyncClientBuilder and H2AsyncClientBuilder fail to take `replaceExecInterceptor()` into account
---
 .../org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java    | 3 +++
 .../org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java  | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java
index c2bd895..676551a 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java
@@ -739,6 +739,9 @@ public class H2AsyncClientBuilder {
                     case BEFORE:
                         execChainDefinition.addBefore(entry.existing, entry.interceptor, entry.name);
                         break;
+                    case REPLACE:
+                        execChainDefinition.replace(entry.existing, entry.interceptor);
+                        break;
                     case FIRST:
                         execChainDefinition.addFirst(entry.interceptor, entry.name);
                         break;
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
index e3cd3e5..5fa828e 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
@@ -946,6 +946,9 @@ public class HttpAsyncClientBuilder {
                     case BEFORE:
                         execChainDefinition.addBefore(entry.existing, entry.interceptor, entry.name);
                         break;
+                    case REPLACE:
+                        execChainDefinition.replace(entry.existing, entry.interceptor);
+                        break;
                     case FIRST:
                         execChainDefinition.addFirst(entry.interceptor, entry.name);
                         break;