Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-654

auto add a LF before a command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.6
    • None
    • Telnet
    • None
    • all environment 

    Description

      I use TelnetClient to connect to my H3C router. When I type the first command, it's ok. When I type the second command, TelnetClient automatically add a LF character before my second command, i.e. send an empty command before my second command.

      I review the source code of TelnetOutputStream.java, in function write(int ch). When I type the first character of my second command, variable _lastWasCR is true, variable __convertCRtoCRLF is true, and because I set nothing of TelnetOption.BINARY, _client._requestedWont(TelnetOption.BINARY) also returns true。 lead to cause my issue.

      Attachments

        1. Main.java
          0.7 kB
          Zhenliang Su
        2. sendb.png
          118 kB
          Zhenliang Su
        3. sendcr.png
          114 kB
          Zhenliang Su
        4. telnetClient.pcap
          3 kB
          Zhenliang Su

        Activity

          People

            Unassigned Unassigned
            smoking Zhenliang Su
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: