We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6793edc commit 7c37f4bCopy full SHA for 7c37f4b
spring-web/src/main/java/org/springframework/http/client/JdkClientHttpRequestFactory.java
@@ -48,10 +48,12 @@ public class JdkClientHttpRequestFactory implements ClientHttpRequestFactory {
48
49
/**
50
* Create a new instance of the {@code JdkClientHttpRequestFactory}
51
- * with a default {@link HttpClient}.
+ * with a default {@link HttpClient} that follows redirects.
52
*/
53
public JdkClientHttpRequestFactory() {
54
- this(HttpClient.newHttpClient());
+ this(HttpClient.newBuilder()
55
+ .followRedirects(HttpClient.Redirect.NORMAL)
56
+ .build());
57
}
58
59
0 commit comments