[Twisted-Python] telnet works, why wont this client/protocol test?

Jasper St. Pierre jstpierre at mecheye.net
Thu Jan 12 14:25:15 EST 2012

If you really want:

    from twisted.protocols.basic import LineReceiver

    class LFLineReceiver(LineReceiver):
        delimiter = '\n'

I'm assuming that it being '\r\n' by default is because more of the
protocols that use LineReceiver use '\r\n' as their delimiter. It's
not entirely hard to switch to '\n' as the delimiter.

On Thu, Jan 12, 2012 at 1:57 PM, Augusto Mecking Caringi
<augustocaringi at gmail.com> wrote:
> On Thu, Jan 12, 2012 at 4:33 PM, Glyph <glyph at twistedmatrix.com> wrote:
>> On Jan 12, 2012, at 1:06 PM, Augusto Mecking Caringi wrote:
>> "Most textual Internet protocols (including HTTP, SMTP, FTP, IRC and
>> many others) mandate the use of ASCII CR+LF (0x0D 0x0A) on the
>> protocol level, but recommend that tolerant applications recognize
>> lone LF as well."
>> [citation needed]
>> Where is the recommendation that "tolerant" applications recognize lone LF
>> for these protocols?  Re-skimming the RFCs now, they all seem to mandate CR
>> LF.  (Also: is there a recommendation elsewhere that delineates between
>> tolerant and intolerant applications?)
>> -glyph
> Right.
> But there is an interesting fact:
> "nc" and "openssl s_client", two utilities that I use every day to
> connect to diferent types of servers send only LF as default...
> To use CRLF you must explicity do this:
> From the openssl s_client man page:
> -crlf
>           this option translated a line feed from the terminal into
> CR+LF as required by some servers.
> From the nc man page:
> -C      Send CRLF as line-ending
> Why?
> --
> Augusto Mecking Caringi
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


More information about the Twisted-Python mailing list