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 2888F11A40 for ; Thu, 25 Sep 2014 06:06:34 +0000 (UTC) Received: (qmail 89203 invoked by uid 500); 25 Sep 2014 06:06:34 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 89162 invoked by uid 500); 25 Sep 2014 06:06:34 -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 89147 invoked by uid 99); 25 Sep 2014 06:06:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Sep 2014 06:06:33 +0000 Date: Thu, 25 Sep 2014 06:06:33 +0000 (UTC) From: "Kurian Abraham (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HTTPCLIENT-1555) Socket timeout not applied to SSLSocketFactory & it waits indefinitely. 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-1555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14147435#comment-14147435 ] Kurian Abraham edited comment on HTTPCLIENT-1555 at 9/25/14 6:05 AM: --------------------------------------------------------------------- The SSL handshake timeout is working, but I don't currently have the means to test a HTTP layer socket timeout after the SSL handshake has completed. Shouldn't a call to sock.setSoTimeout(); be placed after the call to createLayeredSocket() to set the timeout again from the configuration? The SSLCertificateSocketFactory documentation says the socket timeout is set to 0 after the handshake. Also you're setting if (connectTimeout > 0 && sock.getSoTimeout() == 0) { sock.setSoTimeout(connectTimeout); } before the plain TCP connection. What if the user WANTS an infinite socket timeout for the SSL handshake and has set it to 0 on purpose? Are you considering the TCP layer and SSL layer to be one and that they should use the same connect timeout since they are out of the scope of HTTP? I believe this should be removed and instead the socket timeout should be set after createLayeredConfig() from the socket configuration. was (Author: kathampy): The SSL handshake timeout is working, but I don't currently have the means to test a HTTP layer socket timeout after the SSL handshake has completed. Shouldn't a call to sock.setSoTimeout(); be placed after the call to createLayeredSocket() to set the timeout again from the configuration? The SSLCertificateSocketFactory documentation says the socket timeout is set to 0 after the handshake. Also you're setting if (connectTimeout > 0 && sock.getSoTimeout() == 0) { sock.setSoTimeout(connectTimeout); } before the plain TCP connection. What if the user WANTS an infinite socket timeout for the SSL handshake and has set it to 0 on purpose? I believe this should be removed and instead the socket timeout should be set after createLayeredConfig() from the socket configuration. > Socket timeout not applied to SSLSocketFactory & it waits indefinitely. > ----------------------------------------------------------------------- > > Key: HTTPCLIENT-1555 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1555 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: Android Port > Affects Versions: 4.3.5 > Reporter: Kurian Abraham > Fix For: 4.3.5.1-android > > > SSLCertificateSocketFactory is created with a socket timeout of 0. This causes requests to hang indefinitely. The socket timeout from the request config must be applied. -- 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