Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 42899 invoked from network); 22 Mar 2011 17:17:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Mar 2011 17:17:46 -0000 Received: (qmail 13016 invoked by uid 500); 22 Mar 2011 17:17:46 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 12943 invoked by uid 500); 22 Mar 2011 17:17:46 -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 12935 invoked by uid 99); 22 Mar 2011 17:17:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 17:17:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 17:17:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 2A821422A3 for ; Tue, 22 Mar 2011 17:17:06 +0000 (UTC) Date: Tue, 22 Mar 2011 17:17:06 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: <153317212.4133.1300814226170.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <982070307.4101.1300813146020.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (NET-387) TelnetClient use of FromNetASCIIInputStream and ToNetASCIIOutputStream breaks binary mode on non-Windows platforms MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NET-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb resolved NET-387. ---------------------- Resolution: Fixed Fix Version/s: 3.0 > TelnetClient use of FromNetASCIIInputStream and ToNetASCIIOutputStream breaks binary mode on non-Windows platforms > ------------------------------------------------------------------------------------------------------------------ > > Key: NET-387 > URL: https://issues.apache.org/jira/browse/NET-387 > Project: Commons Net > Issue Type: Bug > Components: Telnet > Affects Versions: 2.2 > Reporter: Archie Cobbs > Fix For: 3.0 > > Attachments: crlf-bugfix.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > I am trying to use the telnet client in conjunction with the telnet BINARY option. > However, the commons-net telnet client has ASCII line-ending conversion hard-coded into it! The result is that even in BINARY mode, any occurrence of CR-LF is replaced by your platform's default line ending sequence. So unless you happen to be running Windows, BINARY mode is screwed up. How ironic. > The attached patch works for me: it seems like this line ending conversion that it's doing is not the job of this library. The telnet protocol has CRLF line endings by definition so this is what any user of this client should expect. If the user of this library wants platform-specific line endings then they can wrap their input in a {{java.io.LineNumberReader}}. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira