Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 90140 invoked from network); 15 Aug 2008 18:10:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Aug 2008 18:10:36 -0000 Received: (qmail 79373 invoked by uid 500); 15 Aug 2008 18:10:33 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 79299 invoked by uid 500); 15 Aug 2008 18:10:33 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 79288 invoked by uid 99); 15 Aug 2008 18:10:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2008 11:10:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Aug 2008 18:09:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 608D3234C1B2 for ; Fri, 15 Aug 2008 11:09:44 -0700 (PDT) Message-ID: <153840241.1218823784394.JavaMail.jira@brutus> Date: Fri, 15 Aug 2008 11:09:44 -0700 (PDT) From: "Sebb (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (NET-230) ParserInitializationException when connecting to a Unix FTP server In-Reply-To: <991830473.1218208064355.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NET-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622952#action_12622952 ] Sebb commented on NET-230: -------------------------- Fixed in SVN: commit -m "NET-230 - ParserInitializationException when connecting to a Unix FTP server: comparison string must be upper case" Committed revision 686298. Thanks for the patch > ParserInitializationException when connecting to a Unix FTP server > ------------------------------------------------------------------ > > Key: NET-230 > URL: https://issues.apache.org/jira/browse/NET-230 > Project: Commons Net > Issue Type: Bug > Reporter: Rob Weaver > Attachments: type_l8.patch > > > Was getting an error when connecting to one of our vendor file servers that was returning "215 UNKNOWN Type: L8" for a SYST command. > The DefaultFTPFileEntryParserFactory does a toUpperCase on the key, which was then being compared to the constant SYST_L8. > That constant was "Type: L8", so it could never match. > Here's the patch (also attached as a file): > # This patch file was generated by NetBeans IDE # Following Index: paths are relative to: C:\Documents and Settings\robw\My Documents\NetBeansProjects\NET_2_0 > # This patch can be applied using context Tools: Patch action on respective folder. > # It uses platform neutral UTF-8 encoding and \n newlines. > # Above lines and this line are ignored by the patching process. > Index: src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java > --- src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java Base > (BASE) > +++ src/main/java/org/apache/commons/net/ftp/FTPClientConfig.java > Locally Modified (Based On LOCAL) > @@ -190,9 +190,12 @@ > * This may happen if the ftpd in question was compiled without system > * information. > * > + * 2008-Aug-07 - Updated to be UPPERCASE so that the check done in > + * createFileEntryParser will succeed. > + * > * @since 1.5 > */ > - public static final String SYST_L8 = "Type: L8"; > + public static final String SYST_L8 = "TYPE: L8"; > > /** > * Identifier by which an Netware-based ftp server is known throughout > Index: > src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParse > rFactoryTest.java > --- > src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParse > rFactoryTest.java Base (BASE) > +++ > src/test/java/org/apache/commons/net/ftp/parser/DefaultFTPFileEntryParse > rFactoryTest.java Locally Modified (Based On LOCAL) @@ -62,6 +62,14 @@ > parser = factory.createFileEntryParser("OS/400"); > assertTrue(parser instanceof CompositeFileEntryParser); > > + parser = factory.createFileEntryParser("AS/400"); > + assertTrue(parser instanceof CompositeFileEntryParser); > + > + // Added test to make sure it handles the Unix systems that > were > + // compiled with OS as "UNKNOWN". This test validates that the > + // check is case-insensitive. > + parser = factory.createFileEntryParser("UNKNOWN Type: L8"); > + > try { > parser = > factory.createFileEntryParser("OS2FTPFileEntryParser"); > fail("Exception should have been thrown. > \"OS2FTPFileEntryParser\" is not a recognized key"); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.