dfs 2003/07/28 19:43:40
Modified: net/src/java/org/apache/commons/net/ftp FTPClient.java
Log:
PR:21937
[EMAIL PROTECTED] (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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]