-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Sylvain LAURENT opened SPR-13125 and commented
Same problem as #17144 but for HttpComponentsAsyncClientHttpRequestFactory : if I configure timeouts at the httpclient level but nothing in HttpComponentsAsyncClientHttpRequestFactory, then no timeout is applied.
In org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory.createAsyncRequest(URI, HttpMethod) one can see that RequestConfig.DEFAULT is set instead of leaving it as nul :
if (context.getAttribute(HttpClientContext.REQUEST_CONFIG) == null) {
// Use request configuration given by the user, when available
RequestConfig config = null;
if (httpRequest instanceof Configurable) {
config = ((Configurable) httpRequest).getConfig();
}
if (config == null) {
config = RequestConfig.DEFAULT;
}
context.setAttribute(HttpClientContext.REQUEST_CONFIG, config);
}
Affects: 4.1.6
Issue Links:
- Configured RequestConfig in HttpClient gets overwritten by default [SPR-12540] #17144 Configured RequestConfig in HttpClient gets overwritten by default
- Defensively access deprecated AbstractHttpClient class from Apache HttpComponents [SPR-14422] #18993 Defensively access deprecated AbstractHttpClient class from Apache HttpComponents
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement