commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r636508 - in /commons/proper/net/trunk/src/java/org/apache/commons/net/ftp: FTPClientConfig.java parser/DefaultFTPFileEntryParserFactory.java
Date Wed, 12 Mar 2008 21:03:51 GMT
Author: sebb
Date: Wed Mar 12 14:03:47 2008
New Revision: 636508

URL: http://svn.apache.org/viewvc?rev=636508&view=rev
Log:
Add a fix for UNKNOWN Type: L8 SYST messages (NET-169)

Modified:
    commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
    commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java

Modified: commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java?rev=636508&r1=636507&r2=636508&view=diff
==============================================================================
--- commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java (original)
+++ commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClientConfig.java Wed
Mar 12 14:03:47 2008
@@ -178,6 +178,14 @@
     public static final String SYST_MVS = "MVS";
 
     /**
+     * Some servers return an "UNKNOWN Type: L8" message
+     * in response to the SYST command. We set these to be a Unix-type system.
+     * This may happen if the ftpd in question was compiled without system
+     * information.
+     */
+    public static final String SYST_L8 = "Type: L8";
+
+    /**
      * Identifier by which an Netware-based ftp server is known throughout
      * the commons-net ftp system.
      */

Modified: commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java?rev=636508&r1=636507&r2=636508&view=diff
==============================================================================
--- commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
(original)
+++ commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParserFactory.java
Wed Mar 12 14:03:47 2008
@@ -92,7 +92,8 @@
 	            {
 	                ukey = key.toUpperCase();
 	            }
-	            if (ukey.indexOf(FTPClientConfig.SYST_UNIX) >= 0)
+	            if (ukey.indexOf(FTPClientConfig.SYST_UNIX) >= 0
+	                    || (ukey.indexOf(FTPClientConfig.SYST_L8) >= 0))
 	            {
 	                parser = createUnixFTPEntryParser();
 	            }



Mime
View raw message