Skip to content

Commit f6d1a4d

Browse files
committed
NET-538 - FTPHTTPClient should use socket factory to create sockets
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/net/trunk@1683528 13f79535-47bb-0310-9956-ffa450edef68
1 parent 5df3f18 commit f6d1a4d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/changes/changes.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The <action> type attribute can be add,update,fix,remove.
6262
-->
6363

6464
<body>
65-
<release version="3.4" date="2015-01-??" description="
65+
<release version="3.4" date="2015-??-??" description="
6666
This is mainly a bug-fix release. See further details below.
6767
6868
This release is binary compatible with previous releases.
@@ -72,6 +72,9 @@ This is mainly a bug-fix release. See further details below.
7272
IMAPExportMbox (example app) allows IMAP folders to be exported into an mbox file.
7373
This is the inverse of the IMAPImportMbox example added previously
7474
">
75+
<action issue="NET-538" type="fix" dev="sebb" due-to="Dzmitry">
76+
FTPHTTPClient should use socket factory to create sockets
77+
</action>
7578
<action issue="NET-566" type="fix" dev="sebb" due-to="Gary Russell">
7679
UnixFTPEntryParser Drops Leading Spaces from File Names
7780
</action>

src/main/java/org/apache/commons/net/ftp/FTPHTTPClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected Socket _openDataConnection_(String command, String arg)
109109
passiveHost = this.getPassiveHost();
110110
}
111111

112-
Socket socket = new Socket(proxyHost, proxyPort);
112+
Socket socket = _socketFactory_.createSocket(proxyHost, proxyPort);
113113
InputStream is = socket.getInputStream();
114114
OutputStream os = socket.getOutputStream();
115115
tunnelHandshake(passiveHost, this.getPassivePort(), is, os);
@@ -129,7 +129,7 @@ protected Socket _openDataConnection_(String command, String arg)
129129
@Override
130130
public void connect(String host, int port) throws SocketException, IOException {
131131

132-
_socket_ = new Socket(proxyHost, proxyPort);
132+
_socket_ = _socketFactory_.createSocket(proxyHost, proxyPort);
133133
_input_ = _socket_.getInputStream();
134134
_output_ = _socket_.getOutputStream();
135135
Reader socketIsReader;

0 commit comments

Comments
 (0)