You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Archie Cobbs (JIRA)" <ji...@apache.org> on 2011/03/22 17:59:06 UTC

[jira] [Created] (NET-387) TelnetClient use of FromNetASCIIInputStream and ToNetASCIIOutputStream breaks binary mode on non-Windows platforms

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


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

[jira] [Resolved] (NET-387) TelnetClient use of FromNetASCIIInputStream and ToNetASCIIOutputStream breaks binary mode on non-Windows platforms

Posted by "Sebb (JIRA)" <ji...@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

[jira] [Updated] (NET-387) TelnetClient use of FromNetASCIIInputStream and ToNetASCIIOutputStream breaks binary mode on non-Windows platforms

Posted by "Archie Cobbs (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Archie Cobbs updated NET-387:
-----------------------------

    Attachment: crlf-bugfix.txt

> 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
>         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