8000 Bump version of Apache httpclient. · Geisirc/google-http-java-client@a31c6d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit a31c6d8

Browse files
Matt Whisenhnuntmattwhisenhunt
authored andcommitted
Bump version of Apache httpclient.
1 parent eb7b529 commit a31c6d8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ public ApacheHttpTransport() {
123123
*/
124124
public ApacheHttpTransport(HttpClient httpClient) {
125125
this.httpClient = httpClient;
126+
HttpParams params = httpClient.getParams();
127+
if (params == null) {
128+
params = newDefaultHttpClient().getParams();
129+
}
130+
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
131+
params.setBooleanParameter(ClientPNames.HANDLE_REDIRECTS, false);
126132
}
127133

128134
/**
@@ -161,8 +167,6 @@ static HttpParams newDefaultHttpParams() {
161167
HttpConnectionParams.setSocketBufferSize(params, 8192);
162168
ConnManagerParams.setMaxTotalConnections(params, 200);
163169
ConnManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(20));
164-
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
165-
params.setBooleanParameter(ClientPNames.HANDLE_REDIRECTS, false);
166170
return params;
167171
}
168172

0 commit comments

Comments
 (0)
0