Skip to content

Commit 9d9e4c7

Browse files
committed
[java] Following redirects by default
1 parent 04a681b commit 9d9e4c7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

java/src/org/openqa/selenium/remote/http/netty/NettyClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,17 @@ private static AsyncHttpClient createHttpClient(ClientConfig config) {
8989
.setConnectTimeout(toClampedInt(config.connectionTimeout().toMillis()))
9090
.setReadTimeout(toClampedInt(config.readTimeout().toMillis()))
9191
.setUseProxyProperties(true)
92-
.setUseProxySelector(true);
92+
.setUseProxySelector(true)
93+
.setFollowRedirect(true);
9394

9495
if (config.credentials() != null) {
9596
Credentials credentials = config.credentials();
9697
if (!(credentials instanceof UsernameAndPassword)) {
9798
throw new IllegalArgumentException("Credentials must be a username and password");
9899
}
99100
UsernameAndPassword uap = (UsernameAndPassword) credentials;
100-
builder.setRealm(new Realm.Builder(uap.username(), uap.password()).setUsePreemptiveAuth(true));
101+
builder.setRealm(
102+
new Realm.Builder(uap.username(), uap.password()).setUsePreemptiveAuth(true));
101103
}
102104

103105
return Dsl.asyncHttpClient(builder);

0 commit comments

Comments
 (0)