FTP client does not work in Active Mode.
----------------------------------------
Key: NET-239
URL: https://issues.apache.org/jira/browse/NET-239
Project: Commons Net
Issue Type: Bug
Affects Versions: 2.0
Reporter: David Latorre
When using FTPClient (under some circumstances?) the reported ip in a PORT command is 127.0.0.1
so the data connection can't be established.
It seems Version 1.4 also suffered from this bug.
I am using JDK 1.5/1.6 under Windows Vista.
Sample code:
public static void main(String[] args) throws Exception {
// TODO code application logic here
FTPClient client = new FTPClient();
client.addProtocolCommandListener(new PrintCommandListener(System.out) );
// client=setTruststore(client);
client.connect("ftp.server.com", 21);
client.login("user", "password");
String[] lista = client.listNames();
for (String el : lista) {
System.out.println(el);
}
client.disconnect();
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|