Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B3CE172C2 for ; Thu, 4 Jun 2015 12:03:38 +0000 (UTC) Received: (qmail 76902 invoked by uid 500); 4 Jun 2015 12:03:38 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 76802 invoked by uid 500); 4 Jun 2015 12:03:38 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 76790 invoked by uid 99); 4 Jun 2015 12:03:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2015 12:03:38 +0000 Date: Thu, 4 Jun 2015 12:03:38 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NET-538) FTPHTTPClient should use socket factory to create sockets 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/NET-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14572636#comment-14572636 ] Sebb commented on NET-538: -------------------------- I've just checked, and none of the other classes (apart from DefaultSocketFactory of course!) instantiate Sockets directly - they all use the socket factory. So it makes sense to do the same here, thus allowing the user to use their own socket factory if required. > FTPHTTPClient should use socket factory to create sockets > --------------------------------------------------------- > > Key: NET-538 > URL: https://issues.apache.org/jira/browse/NET-538 > Project: Commons Net > Issue Type: Bug > Components: FTP > Affects Versions: 3.3 > Environment: win7 + java 64, apache-commons-net3.3.jar > Reporter: Dzmitry > Priority: Minor > > FTPHTTPClient can't set socket timeout when connecting to remote http proxy. This may cause hangouts for calls to remote http ftp proxies. > Expected: FTPHTTPClient supports creation sockets with Factory methods. We had same approach for regular FTPClient calling .setSocketFactory(...) method and have control over socket creation. > Actual: FTPHTTPClient creates Socket inside public void connect(...) directly, and it is impossible to set timouts since this object will be used immediately. It is even impossible to inherit from FTPHTTPClient to override connect - since proxyHost, proxyPort and tunnelHandshake is private. > so we may change > _socket_ = new Socket(proxyHost, proxyPort); > to > _socket_ = _socketFactory_.createSocket(); > and add support for FTPHTTPClient to handle socket factories for http proxies calls. > Is it possiible? -- This message was sent by Atlassian JIRA (v6.3.4#6332)