Unify HTTP client redirect behavior and provide configuration option
Update `ClientHttpRequestFactoryBuilder` implementations to ensure that all libraries have consistent redirect follow behavior. Following of redirects is enabled by default. The `ClientHttpRequestFactorySettings` may be used to change if redirects should be followed. The `spring.http.client.redirects` property may also be used to update the default behavior. Closes gh-42879
This commit is contained in:
@@ -1018,7 +1018,7 @@ public class TestRestTemplate {
|
||||
@SuppressWarnings("removal")
|
||||
public CustomHttpComponentsClientHttpRequestFactory(HttpClientOption[] httpClientOptions,
|
||||
org.springframework.boot.web.client.ClientHttpRequestFactorySettings settings) {
|
||||
this(httpClientOptions, new ClientHttpRequestFactorySettings(settings.connectTimeout(),
|
||||
this(httpClientOptions, new ClientHttpRequestFactorySettings(null, settings.connectTimeout(),
|
||||
settings.readTimeout(), settings.sslBundle()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user