[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137201#comment-14137201
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1554:
-----------------------------------------------

Given that we have unit tests specifically for various scenarios of context 
initialization [1], I doubt this would help. You might want, though, to 
make sure that no bits of your application by accident use deprecated 
HttpParams APIs.

Oleg

[1] 
http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/xref-test/org/apache/http/impl/client/TestInternalHttpClient.html#135



> defaultRequestConfig never used in InternalHttpClient
> -----------------------------------------------------
>
>                 Key: HTTPCLIENT-1554
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1554
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.3.5
>         Environment: android
>            Reporter: Rob Smit
>              Labels: HttpClient
>
> after initializing builder en building client, the timeout settings are not 
> used for the request execution. In ClosableHttpClient.doExecute(), an on the 
> fly request config is used.
> my code:
>         builder = HttpClientBuilder.create();
>         int timeout = 30000;
>         defaultRequestConfig = RequestConfig.custom()
>                 .setSocketTimeout(timeout)
>                 .setConnectTimeout(timeout)
>                 .build();
>         builder.setDefaultRequestConfig(defaultRequestConfig);
>         List<Header> headers = new ArrayList<Header>();
>         headers.add(new BasicHeader("Accept", "application/json"));
>         builder.setDefaultHeaders(headers);
>         builder.useSystemProperties();
>         client = builder.build();
>         client.execute(request)
> timeout settings are never used!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to