You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Dave Pekarek Krohn (JIRA)" <ji...@apache.org> on 2007/01/02 14:43:27 UTC
[jira] Created: (NET-147) FTP __getReply not processing all lines
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
[jira] Resolved: (NET-147) FTP __getReply not processing all lines
Posted by "Dave Pekarek Krohn (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/NET-147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Pekarek Krohn resolved NET-147.
------------------------------------
Resolution: Invalid
Nevermind. I was using retrieveFileStream without completePendingCommand so the next thing I did was failing.
> 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