Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D73ED11775 for ; Wed, 17 Sep 2014 09:38:33 +0000 (UTC) Received: (qmail 39269 invoked by uid 500); 17 Sep 2014 09:38:33 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 39217 invoked by uid 500); 17 Sep 2014 09:38:33 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 39205 invoked by uid 99); 17 Sep 2014 09:38:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Sep 2014 09:38:33 +0000 Date: Wed, 17 Sep 2014 09:38:33 +0000 (UTC) From: "Rob Smit (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HTTPCLIENT-1554) defaultRequestConfig never used InternalHttpClient MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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
headers = new ArrayList
(); 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
headers = new ArrayList
(); 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
headers = new ArrayList
(); > 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