commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander (JIRA)" <j...@apache.org>
Subject [jira] Commented: (NET-297) Using FromNetASCIIInputStream misrepresent standardized telnet input
Date Wed, 10 Mar 2010 04:26:27 GMT

    [ https://issues.apache.org/jira/browse/NET-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843431#action_12843431
] 

Alexander commented on NET-297:
-------------------------------

Please, look at the method *org.apache.commons.net.telnet.TelnetClient#_connectAction_()*.
What is it do?

It checks whether conversion required:
{noformat}if (FromNetASCIIInputStream.isConversionRequired())
    input = new FromNetASCIIInputStream(_input_);
else
    input = _input_;
{noformat}

But _WHY_ is it requred? RFC 0854 says that:
{quote}
Therefore, the sequence "CR LF" must be treated as a single "new
line" character and used whenever their combined action is
intended; the sequence "CR NUL" must be used where a carriage
return alone is actually desired; and the CR character must be
avoided in other contexts. This rule gives assurance to systems
which must decide whether to perform a "new line" function or a
multiple-backspace that the TELNET stream contains a character
following a CR that will allow a rational decision.
{quote}

> Using FromNetASCIIInputStream misrepresent standardized telnet input
> --------------------------------------------------------------------
>
>                 Key: NET-297
>                 URL: https://issues.apache.org/jira/browse/NET-297
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: POSIX systems like Linux/Unix
>            Reporter: Alexander
>            Priority: Minor
>
> I encounter strange behavior while using TelnetClient first time. I receive the only
'\n' char, instead of '\r\n' as defined in RFC 0854. After inspecting source code I've found
that the conversion occurs depending on platform depended property.
> For what? What about "write once, run everywhere"? Now I'm forced to write a wrapper
to make conversion back. So, could you make that conversion manageable by means of a writable
boolean property?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message