From c2c62af20ce191d5a695de18ef1c49d64aebbe7a Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 8 Aug 2019 12:46:27 -0400 Subject: [PATCH 1/2] remove obsolete and deprecated parent --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index 8370183c2..005439475 100644 --- a/pom.xml +++ b/pom.xml @@ -2,11 +2,6 @@ 4.0.0 - - org.sonatype.oss - oss-parent - 7 - com.google.http-client google-http-client-parent 1.31.1-SNAPSHOT From 1a9c36f825387e8fff3e542c072105041b91dd5c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 23 Oct 2019 14:21:55 -0400 Subject: [PATCH 2/2] use platform default TCP buffer sizes --- .../client/http/apache/v2/ApacheHttpTransport.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java index 0e735f174..864dd072f 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java @@ -29,7 +29,6 @@ import org.apache.http.client.methods.HttpPut; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.methods.HttpTrace; -import org.apache.http.config.SocketConfig; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; @@ -74,7 +73,7 @@ public ApacheHttpTransport() { * Constructor that allows an alternative Apache HTTP client to be used. * *

- * Note that in the previous version, we overrode several settings, however, we are no longer able + * Note that in the previous version, we overrode several settings. However, we are no longer able * to do so. *

* @@ -102,12 +101,11 @@ public ApacheHttpTransport(HttpClient httpClient) { *

* * @@ -127,7 +125,6 @@ public static HttpClient newDefaultHttpClient() { *

*
    *
  • The client connection manager is set to {@link PoolingHttpClientConnectionManager}.
  • - *
  • The socket buffer size is set to 8192 using {@link SocketConfig}.
  • *
  • *
  • The route planner uses {@link SystemDefaultRoutePlanner} with @@ -140,17 +137,10 @@ public static HttpClient newDefaultHttpClient() { * @since 1.31 */ public static HttpClientBuilder newDefaultHttpClientBuilder() { - // Set socket buffer sizes to 8192 - SocketConfig socketConfig = - SocketConfig.custom() - .setRcvBufSize(8192) - .setSndBufSize(8192) - .build(); return HttpClientBuilder.create() .useSystemProperties() .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) - .setDefaultSocketConfig(socketConfig) .setMaxConnTotal(200) .setMaxConnPerRoute(20) .setConnectionTimeToLive(-1, TimeUnit.MILLISECONDS)