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() {
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
You can’t perform that action at this time.
0 commit comments