commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21815] New: - ftp transfer resume not working with passive mode.
Date Tue, 22 Jul 2003 22:26:04 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21815>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21815

ftp transfer resume not working with passive mode.

           Summary: ftp transfer resume not working with passive mode.
           Product: Commons
           Version: 1.0 Final
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Net
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: poitypoity@hotmail.com


subject says it all: I think you just omitted the following code in 
ftpclient.java:

instead of:
            socket = _socketFactory_.createSocket(__passiveHost, __passivePort);

            if (!FTPReply.isPositivePreliminary(sendCommand(command, arg)))
            {
                socket.close();
                return null;
            }

should read:

            socket = _socketFactory_.createSocket(__passiveHost, __passivePort);

            if ((__restartOffset > 0) && !restart(__restartOffset))
            {
                socket.close();
                return null;
            }

            if (!FTPReply.isPositivePreliminary(sendCommand(command, arg)))
            {
                socket.close();
                return null;
            }


That is, you just forgot a simple clause (which I adapted from the active mode 
code).  I tested it (basically) and it works.
hope this helps your excellent project.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message