From 1d7ee41c66a910f6d1571527f9f33b17b4d414be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20L=C3=B3pez=20Muntaner?= Date: Wed, 23 Mar 2022 16:09:49 +0100 Subject: [PATCH 1/3] Reuse https connections --- .../com/ecwid/consul/transport/DefaultHttpsTransport.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ecwid/consul/transport/DefaultHttpsTransport.java b/src/main/java/com/ecwid/consul/transport/DefaultHttpsTransport.java index 29b9eb97..69e2ac77 100644 --- a/src/main/java/com/ecwid/consul/transport/DefaultHttpsTransport.java +++ b/src/main/java/com/ecwid/consul/transport/DefaultHttpsTransport.java @@ -20,6 +20,7 @@ import com.ecwid.consul.transport.TLSConfig.KeyStoreInstanceType; import org.apache.http.conn.ssl.TrustSelfSignedStrategy; import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.client.NoopUserTokenHandler; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.ssl.SSLContexts; @@ -67,7 +68,9 @@ public DefaultHttpsTransport(TLSConfig tlsConfig) { HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(). setConnectionManager(connectionManager). - setDefaultRequestConfig(requestConfig); + setDefaultRequestConfig(requestConfig). + useSystemProperties(). + setUserTokenHandler(new NoopUserTokenHandler()); this.httpClient = httpClientBuilder.build(); } catch (GeneralSecurityException e) { From 74bf32539d400a13c7c8054ab26df39cf2e3e1c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20L=C3=B3pez=20Muntaner?= Date: Wed, 23 Mar 2022 16:12:34 +0100 Subject: [PATCH 2/3] Update dependencies --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 54a3f5df..9785f4c0 100644 --- a/build.gradle +++ b/build.gradle @@ -10,9 +10,9 @@ repositories { } dependencies { - implementation "com.google.code.gson:gson:2.8.9" - implementation "org.apache.httpcomponents:httpcore:4.4.9" - implementation "org.apache.httpcomponents:httpclient:4.5.5" + implementation "com.google.code.gson:gson:2.9.0" + implementation "org.apache.httpcomponents:httpcore:4.4.15" + implementation "org.apache.httpcomponents:httpclient:4.5.13" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0' From 4eb6d4ad0cb915443cd27c58f3f044fe3774a577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Antonio=20L=C3=B3pez=20Muntaner?= Date: Wed, 23 Mar 2022 16:13:04 +0100 Subject: [PATCH 3/3] Bump version --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9785f4c0..1edb4bd2 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ def doUploadArchives = project.hasProperty('sonatypeUsername') && project.hasPro if (doUploadArchives) { group = "com.ecwid.consul" archivesBaseName = "consul-api" - version = "1.4.5" + version = "1.4.6" signing { sign configurations.archives