[
https://issues.apache.org/jira/browse/HTTPCLIENT-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oleg Kalnichevski resolved HTTPCLIENT-2190.
-------------------------------------------
Resolution: Invalid
[~mbalieiro] The behavior of HttpClientBuilder is clearly stated in its
javadocs. If one explicitly sets a custom connection manager it supercedes all
connection management settings used by the builder and is expected to be fully
configured.
We are not going to make an exception for just two parameters.
Oleg
> HttpClientBuilder does not configure correctly the HttpClientConnectionManager
> ------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-2190
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2190
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (classic)
> Affects Versions: 4.5.13
> Reporter: Marco Balieiro
> Priority: Major
>
> The class HttpClientBuilder does not configure correctly the
> HttpClientConnectionManager properties "maxTotal" and "defaultMaxPerRoute" if
> I already provided a ConnectionManager.
> I sugest that the code on line 1000 should be put out of the "if" that tests
> if the "connManagerCopy" is null. Some think like this:
> if (connManagerCopy instanceof ConnPoolControl) {
> ConnPoolControl<?> connPoolControl = (ConnPoolControl<?>)
> connManagerCopy;
> if (systemProperties) {
> String s = System.getProperty("http.keepAlive", "true");
> if ("true".equalsIgnoreCase(s)) {
> s = System.getProperty("http.maxConnections", "5");
> final int max = Integer.parseInt(s);
> connPoolControl.setDefaultMaxPerRoute(max);
> connPoolControl.setMaxTotal(2 * max);
> }
> }
> if (maxConnTotal > 0) {
> connPoolControl.setMaxTotal(maxConnTotal);
> }
> if (maxConnPerRoute > 0) {
> connPoolControl.setDefaultMaxPerRoute(maxConnPerRoute);
> }
> }
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]