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

2012-01-12 Thread Jasper St. Pierre
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 s

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

2012-01-12 Thread Tristan Seligmann
On Thu, Jan 12, 2012 at 8:57 PM, Augusto Mecking Caringi wrote: > 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... "nc" and "openssl s_client" read bytes from stdin

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

2012-01-12 Thread Augusto Mecking Caringi
On Thu, Jan 12, 2012 at 4:33 PM, Glyph 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 applic

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

2012-01-12 Thread Glyph
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 ne

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

2012-01-12 Thread Mike Winter
Thanks for the link, added to code as comment. On Jan 12, 2012, at 10:06:16AM, Augusto Mecking Caringi wrote: > On Thu, Jan 12, 2012 at 3:56 PM, Mike Winter wrote: >> That helps, thanks. >> >> I know that http processing does \r\n, I suppose there is an rfc that says >> this is reasonable, and

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

2012-01-12 Thread Augusto Mecking Caringi
On Thu, Jan 12, 2012 at 3:56 PM, Mike Winter wrote: > That helps, thanks. > > I know that http processing does \r\n, I suppose there is an rfc that says > this is reasonable, and LineReceiver is designed to be used in http for the > same reason. "Most textual Internet protocols (including HTTP,

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

2012-01-12 Thread Itamar Turner-Trauring
> That helps, thanks. > > I know that http processing does \r\n, I suppose there is an rfc that says > this is reasonable, and LineReceiver is designed to be used in http for > the same reason. So does telnet, smtp, ftp, etc.. ___ Twisted-Python mailin

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

2012-01-12 Thread Mike Winter
That helps, thanks. I know that http processing does \r\n, I suppose there is an rfc that says this is reasonable, and LineReceiver is designed to be used in http for the same reason. On Jan 12, 2012, at 4:42:45AM, Itamar Turner-Trauring wrote: > At a guess, it's because by default LineReceiv

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

2012-01-12 Thread Itamar Turner-Trauring
At a guess, it's because by default LineReceiver splits on '\r\n', but you're sending only '\n'. -Itamar ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

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

2012-01-12 Thread Mike Winter
i can telnet to the port given in test-code below and it interacts appropriately. The connection is to a regular portforwarder and the server is an Answer-server: class Answer(LineReceiver): answers = {'How are you?': 'Fine', 'no': 'No!?!', None : "I don't know