Issue Details (XML | Word | Printable)

Key: NET-151
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Neil Aggarwal
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Commons Net

[PATCH] Allow user to force passive connections to use connected host in FTPClient

Created: 13/Feb/07 05:24 AM   Updated: 15/Feb/07 10:33 PM
Return to search
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works FTPClient.patch.txt 2007-02-13 05:25 AM Neil Aggarwal 3 kB
Text File Licensed for inclusion in ASF works FTPClientOverrideHost.patch.txt 2007-02-13 03:53 PM Neil Aggarwal 2 kB
Environment: Windows XP, Java 1.5.0, Intel processor

Resolution Date: 15/Feb/07 10:33 PM


 Description  « Hide
Currently, FTPClient always uses the host and port returned to it from the reply to a passive connection request.
Some FTP hosts are set incorrectly or are set behind a NAT so they report the incorrect IP address to use for the connection and the transfer will fail to connect.
This patch allows the user to tell FTPClient to use the connected host instead of the host given from the passive reply.
Doing so will allow successful transfers even when the report FTP server returns an incorrect IP address.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Neil Aggarwal added a comment - 13/Feb/07 05:25 AM
Patch for FTPClient

Neil Aggarwal added a comment - 13/Feb/07 03:53 PM
Steffen Heil [lists@steffen-heil.de] suggested to use a method with this signature:
overrideHostForPassiveConnections(InetAddress)
which is a more elegant solution.

This patch implements that method. Use this instead of the previous patch.


Rory Winston added a comment - 15/Feb/07 10:33 PM
Patch applied.