summaryrefslogtreecommitdiffstats
path: root/vespa-http-client
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2019-12-05 17:13:18 +0100
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2019-12-05 17:13:43 +0100
commit67e9162ccf16f96acb0dbefab200c979b5cb0962 (patch)
tree9626d3720cc5aabb625d7a86b439053a1d8b47f9 /vespa-http-client
parent46dc5eb47d7f9ebb5bb8f950d966e40d9d656da7 (diff)
Ensure connections are reused when client auth enabled
Diffstat (limited to 'vespa-http-client')
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
index 7aa451bd8db..e95044ce6d2 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
@@ -416,6 +416,7 @@ class ApacheGatewayConnection implements GatewayConnection {
if (connectionParams.getHostnameVerifier() != null) {
clientBuilder.setSSLHostnameVerifier(connectionParams.getHostnameVerifier());
}
+ clientBuilder.setUserTokenHandler(context -> null); // https://stackoverflow.com/a/42112034/1615280
}
clientBuilder.setMaxConnPerRoute(1);
clientBuilder.setMaxConnTotal(1);