commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rory Winston (JIRA)" <>
Subject [jira] Resolved: (NET-58) [net] FTPClient throws exception when passive mode reply lacks parentheses
Date Sun, 27 Aug 2006 13:56:23 GMT
     [ ]

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:
>             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(
>      [java]     at
>      [java]     at
>      [java]     at
>      [java]     at
> Looking at that code in __parsePassiveModeReply it appears to require the reply
> to be enclosed parentheses, which it should not, according to RFC 1123: 
>  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:
For more information on JIRA, see:


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

View raw message