You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Wade Poziombka (JIRA)" <ji...@apache.org> on 2010/06/03 00:38:03 UTC

[jira] Updated: (NET-325) FTPSClient does not support pure-ftpd - data connection issues

     [ https://issues.apache.org/jira/browse/NET-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wade Poziombka updated NET-325:
-------------------------------

    Attachment: commons-net-2.1-ftp.patch

Here is the patch file for my changes.  They do include the changes made in NET-313.

This patch changes the way _openDataConnection_ works to send the command without waiting for a reply.  Then doing the handshake and finally receiving the preliminary reply .  

It also allows FTPClient to support extension commands without having to explicitly add them to the FTPCommand.  For example MLSD, MLST etc.  Several methods have been modified and a few new ones added:

FTP.sendCommanNoWait(String cmd, String arg);

FTPClient:
protected Socket _openDataConnection_(String command, String arg) throws IOException
protected void dataConnectionHandshake(final Socket socket) throws IOException
public int sendCommand(String cmd, String cmdArgs, InputStream input) throws IOException
public int sendCommand(String cmd, String cmdArgs, OutputStream output) throws IOException

FTPSClient
Override of protected void dataConnectionHandshake(final Socket socket) throws IOException
Remove (delete) override of _openDataConnection(int, String) as not needed in favor of dataConnectionHandshake method which occurs in middle of the data connection process.

I hope you will give my changes due consideration and include them in 2.1 if possible.  I make every attempt to use libraries such as Apache Commons Net without altering them but could not do so in this case without basically copying the entire code set.

Please contact me if you have questions of find issue with any of my modifications.


> FTPSClient does not support pure-ftpd - data connection issues
> --------------------------------------------------------------
>
>                 Key: NET-325
>                 URL: https://issues.apache.org/jira/browse/NET-325
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: Solaris 10, Windows 2003/XP, Linux (variety).  
> pure-ftpd (1.0.29) running on Linux
>            Reporter: Wade Poziombka
>         Attachments: commons-net-2.1-ftp.patch
>
>
> I do not dare attempt to declare who is right or not.  However given the popularity of pure-ftpd, FTPSClient should support it.
> It seems pure-ftpd expects the SSL handshake before sending the 150 reply to command (e.g., LIST).
> So it seems that it expects:
> > PASV | PORT
> < 227 etc.
> > LIST
> > handshake
> < 150
> ...
> < 226
> In Commons Net ftp does the following with the expectation that after the connection is accepted that the server will reply with a 150 ... reply.  However, pure-ftpd does not.  It only sends the 150 after the handshake is complete.  It means that the Socket read times out waiting for the 150.
> > PASV | PORT
> < 227
> > LIST
> < 150
> > handshake
> ...
> < 226
> I have patched 2.1 (which includes the NET-313 changes) to support pure-ftpd.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.