You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Rob Smit (JIRA)" <ji...@apache.org> on 2014/09/17 15:57:33 UTC

[jira] [Comment Edited] (HTTPCLIENT-1554) defaultRequestConfig never used in InternalHttpClient

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

Rob Smit edited comment on HTTPCLIENT-1554 at 9/17/14 1:56 PM:
---------------------------------------------------------------

Yes, by checking out the source and running test, I can not reproduce. Using android the HttpRequest contains an empty array params attribute.
Indeed the source of the problem is that in android code the HttpRequest has no null params (new HttpGet(url)). is there a work around?


was (Author: robsmit):
Yes, by checking out the source and running test, I can not reproduce. Using android the HttpRequest contains an empty array params attribute.
Indeed the source of the problem is that in android code the HttpRequest has no null params.

> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org