commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (NET-387) TelnetClient use of FromNetASCIIInputStream and ToNetASCIIOutputStream breaks binary mode on non-Windows platforms
Date Tue, 22 Mar 2011 17:17:06 GMT

     [ 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

Mime
View raw message