commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rory Winston (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (NET-58) [net] FTPClient throws exception when passive mode reply lacks parentheses
Date Sun, 27 Aug 2006 13:56:23 GMT
     [ http://issues.apache.org/jira/browse/NET-58?page=all ]

Rory Winston resolved NET-58.
-----------------------------

    Resolution: Incomplete

Need more info in order to fix this. 

> [net] FTPClient throws exception when passive mode reply lacks parentheses
> --------------------------------------------------------------------------
>
>                 Key: NET-58
>                 URL: http://issues.apache.org/jira/browse/NET-58
>             Project: Commons Net
>          Issue Type: Bug
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Eliot Polk
>
> Commons net version 1.4.1 (this doesn't appear in the Bugzilla dropdown)
> When my application does a storeFile to an admittedly obscure FTP server
> (ActiveState ftpd.tcl), it gets this exception from FTPClient:
>      [java] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>      [java]     at java.lang.String.substring(String.java:1444)
>      [java]     at
> org.apache.commons.net.ftp.FTPClient.__parsePassiveModeReply(FTPClient.java:341)
>      [java]     at
> org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:511)
>      [java]     at
> org.apache.commons.net.ftp.FTPClient.__storeFile(FTPClient.java:388)
>      [java]     at
> org.apache.commons.net.ftp.FTPClient.storeFile(FTPClient.java:1388)
> Looking at that code in __parsePassiveModeReply it appears to require the reply
> to be enclosed parentheses, which it should not, according to RFC 1123: 
>  IMPLEMENTATION:
>  The format of the 227 reply to a PASV command is not
>  well standardized.  In particular, an FTP client cannot
>  assume that the parentheses shown on page 40 of RFC-959
>  will be present (and in fact, Figure 3 on page 43 omits
>  them).  Therefore, a User-FTP program that interprets
>  the PASV reply must scan the reply for the first digit
>  of the host and port numbers.
>  
> My application and FTPClient work fine when connecting to a Fedora ftp server.
>   Using Fedora command line ftp to do the ftp PUT to the ActiveState tcl ftp
> server also works fine.

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