Skip to content

Commit

Permalink
Bump okhttp client to infinity to match old apache httpclient behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Stewart committed Feb 7, 2018
1 parent 2ffdc49 commit 4fff7fc
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.openqa.selenium.remote.internal;

import static java.util.concurrent.TimeUnit.MINUTES;

import com.google.common.base.Strings;

import org.openqa.selenium.remote.http.HttpClient;
Expand All @@ -34,6 +36,7 @@
import java.io.IOException;
import java.net.URL;
import java.util.Optional;
import java.util.concurrent.TimeUnit;

public class OkHttpClient implements HttpClient {

Expand Down Expand Up @@ -122,7 +125,8 @@ public HttpClient createClient(URL url) {
okhttp3.OkHttpClient.Builder client = new okhttp3.OkHttpClient.Builder()
.connectionPool(pool)
.followRedirects(true)
.followSslRedirects(true);
.followSslRedirects(true)
.readTimeout(0, MINUTES);

String info = url.getUserInfo();
if (!Strings.isNullOrEmpty(info)) {
Expand Down

0 comments on commit 4fff7fc

Please sign in to comment.