commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Pekarek Krohn (JIRA)" <j...@apache.org>
Subject [jira] Created: (NET-147) FTP __getReply not processing all lines
Date Tue, 02 Jan 2007 13:43:27 GMT
FTP __getReply not processing all lines
---------------------------------------

                 Key: NET-147
                 URL: http://issues.apache.org/jira/browse/NET-147
             Project: Commons Net
          Issue Type: Bug
         Environment: Using Commons Net within a windows tool.  Trying to access a linux FTP
server.
            Reporter: Dave Pekarek Krohn


FTPClient.retrieveFile was returning a failure.  When I investigated further, it was returning
an "Unknown Command" error from the "port" command (which had worked successfully for other
commands).

Tracking this down even further I noticed this code in FTP.__getReply (line 291 from the 1.4.1
release):

        // Get extra lines if message continues.
        if (length > 3 && line.charAt(3) == '-')
        {

The problem is that the first response line doesn't have '-' as the 3rd character (it doesn't
have it anywhere in the line).  So the method isn't processing all of the following lines.
 The next time it processes a response line, it is actually processing the second line of
the previous command.

There are a couple of bugs reported in BugZilla (36473, 35260) that MAY be related to this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
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