commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Pekarek Krohn (JIRA)" <>
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
             Project: Commons Net
          Issue Type: Bug
         Environment: Using Commons Net within a windows tool.  Trying to access a linux FTP
            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

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

        // 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:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message