[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaSocket Patch for CR Handling
- From: "Stuart P. Bentley" <stuart@...>
- Date: Fri, 3 Dec 2010 18:40:37 -0800
?What spec allows just CR? Every spec I've ever heard of mandates CRLF for
transport.
-----Original Message-----
From: HyperHacker
Sent: Tuesday, November 30, 2010 P8:46 Newsgroups:
gmane.comp.lang.lua.general
To: Lua mailing list
Subject: LuaSocket Patch for CR Handling
I've been playing with IRC for a bit now and one thing that's been
bothering me is that the specs allow for a line to be terminated with
just CR. LuaSocket however discards CRs and treats only LF as line
break, which means any IRC client using it can't easily conform to the
spec.
I decided to fix this with a simple patch to recvline(); it now
accepts CR, LF, or CR LF as line breaks. I didn't test this
extensively, but everything still seems to be working, so here we go.
--
Sent from my toaster.