File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
google-http-client/src/main/java/com/google/api/client/http/apache Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,12 @@ public ApacheHttpTransport() {
123
123
*/
124
124
public ApacheHttpTransport (HttpClient httpClient ) {
125
125
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 );
126
132
}
127
133
128
134
/**
@@ -161,8 +167,6 @@ static HttpParams newDefaultHttpParams() {
161
167
HttpConnectionParams .setSocketBufferSize (params , 8192 );
162
168
ConnManagerParams .setMaxTotalConnections (params , 200 );
163
169
ConnManagerParams .setMaxConnectionsPerRoute (params , new ConnPerRouteBean (20 ));
164
- HttpProtocolParams .setVersion (params , HttpVersion .HTTP_1_1 );
165
- params .setBooleanParameter (ClientPNames .HANDLE_REDIRECTS , false );
166
170
return params ;
167
171
}
168
172
You can’t perform that action at this time.
0 commit comments