commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: jakarta-commons/net/src/java/org/apache/commons/net/ftp FTPClient.java
Date Tue, 29 Jul 2003 02:43:40 GMT
dfs         2003/07/28 19:43:40

  Modified:    net/src/java/org/apache/commons/net/ftp FTPClient.java
  Log:
  PR:21937
  
  sestegra@free.fr (Stephane ESTE-GRACIAS) reported that a VMS FTP server he
  is using replied to the SYST command with a 200 response code instead of
  a 215 response code.  Therefore, I softened the success condition for
  getSystemName() to merely be a positive completion.
  
  Revision  Changes    Path
  1.12      +5 -1      jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java
  
  Index: FTPClient.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/net/src/java/org/apache/commons/net/ftp/FTPClient.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FTPClient.java	23 Jul 2003 13:40:41 -0000	1.11
  +++ FTPClient.java	29 Jul 2003 02:43:40 -0000	1.12
  @@ -1792,7 +1792,11 @@
        ***/
       public String getSystemName() throws IOException
       {
  -        if (syst() == FTPReply.NAME_SYSTEM_TYPE)
  +      //if (syst() == FTPReply.NAME_SYSTEM_TYPE)
  +      // Technically, we should expect a NAME_SYSTE_TYPE response, but
  +      // in practice FTP servers deviate, so we soften the condition to
  +      // a positive completion.
  +        if (FTPReply.isPositiveCompletion(syst()))
               return ((String)_replyLines.elementAt(0)).substring(4);
   
           return null;
  
  
  

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