2929import org .apache .http .client .methods .HttpPut ;
3030import org .apache .http .client .methods .HttpRequestBase ;
3131import org .apache .http .client .methods .HttpTrace ;
32- import org .apache .http .config .SocketConfig ;
3332import org .apache .http .conn .ssl .SSLConnectionSocketFactory ;
3433import org .apache .http .impl .client .CloseableHttpClient ;
3534import org .apache .http .impl .client .HttpClientBuilder ;
@@ -74,7 +73,7 @@ public ApacheHttpTransport() {
7473 * Constructor that allows an alternative Apache HTTP client to be used.
7574 *
7675 * <p>
77- * Note that in the previous version, we overrode several settings, however , we are no longer able
76+ * Note that in the previous version, we overrode several settings. However , we are no longer able
7877 * to do so.
7978 * </p>
8079 *
@@ -102,12 +101,11 @@ public ApacheHttpTransport(HttpClient httpClient) {
102101 * </p>
103102 * <ul>
104103 * <li>The client connection manager is set to {@link PoolingHttpClientConnectionManager}.</li>
105- * <li>The socket buffer size is set to 8192 using {@link SocketConfig}.</li>
106104 * <li><The retry mechanism is turned off using
107105 * {@link HttpClientBuilder#disableRedirectHandling}.</li>
108106 * <li>The route planner uses {@link SystemDefaultRoutePlanner} with
109107 * {@link ProxySelector#getDefault()}, which uses the proxy settings from <a
110- * href="http ://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html">system
108+ * href="https ://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html">system
111109 * properties</a>.</li>
112110 * </ul>
113111 *
@@ -127,7 +125,6 @@ public static HttpClient newDefaultHttpClient() {
127125 * </p>
128126 * <ul>
129127 * <li>The client connection manager is set to {@link PoolingHttpClientConnectionManager}.</li>
130- * <li>The socket buffer size is set to 8192 using {@link SocketConfig}.</li>
131128 * <li><The retry mechanism is turned off using
132129 * {@link HttpClientBuilder#disableRedirectHandling}.</li>
133130 * <li>The route planner uses {@link SystemDefaultRoutePlanner} with
@@ -140,17 +137,10 @@ public static HttpClient newDefaultHttpClient() {
140137 * @since 1.31
141138 */
142139 public static HttpClientBuilder newDefaultHttpClientBuilder () {
143- // Set socket buffer sizes to 8192
144- SocketConfig socketConfig =
145- SocketConfig .custom ()
146- .setRcvBufSize (8192 )
147- .setSndBufSize (8192 )
148- .build ();
149140
150141 return HttpClientBuilder .create ()
151142 .useSystemProperties ()
152143 .setSSLSocketFactory (SSLConnectionSocketFactory .getSocketFactory ())
153- .setDefaultSocketConfig (socketConfig )
154144 .setMaxConnTotal (200 )
155145 .setMaxConnPerRoute (20 )
156146 .setConnectionTimeToLive (-1 , TimeUnit .MILLISECONDS )
0 commit comments