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/06/17 10:45:43 UTC
[httpcomponents-client] branch master updated: HTTPCLIENT-2084:
client builders incorrectly add message interceptors with LAST position to
the head of the list
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 f268d19 HTTPCLIENT-2084: client builders incorrectly add message interceptors with LAST position to the head of the list
f268d19 is described below
commit f268d192d484c81e933d228ce9e9b630de008d90
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Wed Jun 17 12:44:04 2020 +0200
HTTPCLIENT-2084: client builders incorrectly add message interceptors with LAST position to the head of the list
---
.../org/apache/hc/client5/http/impl/async/H2AsyncClientBuilder.java | 2 +-
.../org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java | 4 ++--
.../org/apache/hc/client5/http/impl/classic/HttpClientBuilder.java | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
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 b5d7226..c2bd895 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
@@ -660,7 +660,7 @@ public class H2AsyncClientBuilder {
if (responseInterceptors != null) {
for (final ResponseInterceptorEntry entry: responseInterceptors) {
if (entry.postion == ResponseInterceptorEntry.Postion.LAST) {
- b.addFirst(entry.interceptor);
+ b.addLast(entry.interceptor);
}
}
}
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 a87a0ab..e3cd3e5 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
@@ -803,14 +803,14 @@ public class HttpAsyncClientBuilder {
if (requestInterceptors != null) {
for (final RequestInterceptorEntry entry: requestInterceptors) {
if (entry.postion == RequestInterceptorEntry.Postion.LAST) {
- b.addFirst(entry.interceptor);
+ b.addLast(entry.interceptor);
}
}
}
if (responseInterceptors != null) {
for (final ResponseInterceptorEntry entry: responseInterceptors) {
if (entry.postion == ResponseInterceptorEntry.Postion.LAST) {
- b.addFirst(entry.interceptor);
+ b.addLast(entry.interceptor);
}
}
}
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/HttpClientBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/HttpClientBuilder.java
index e01a2b4..8da6f13 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/HttpClientBuilder.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/HttpClientBuilder.java
@@ -834,14 +834,14 @@ public class HttpClientBuilder {
if (requestInterceptors != null) {
for (final RequestInterceptorEntry entry: requestInterceptors) {
if (entry.postion == RequestInterceptorEntry.Postion.LAST) {
- b.addFirst(entry.interceptor);
+ b.addLast(entry.interceptor);
}
}
}
if (responseInterceptors != null) {
for (final ResponseInterceptorEntry entry: responseInterceptors) {
if (entry.postion == ResponseInterceptorEntry.Postion.LAST) {
- b.addFirst(entry.interceptor);
+ b.addLast(entry.interceptor);
}
}
}