hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Smit (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HTTPCLIENT-1554) defaultRequestConfig never used InternalHttpClient
Date Wed, 17 Sep 2014 09:38:33 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rob Smit updated HTTPCLIENT-1554:
---------------------------------
    Description: 
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!


  was:
after initializing builder en building client, the timeout settings are not used for the request
execution. IN ClosableHttpClient.doExecute(), a 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!



> defaultRequestConfig never used 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


Mime
View raw message