push_read line does not work as expected with line ending of "\015\015\012"

Marc Lehmann schmorp at schmorp.de
Thu Sep 30 11:07:19 CEST 2010


On Tue, Sep 28, 2010 at 07:48:25PM -0500, Lee Aylward <lee at laylward.com> wrote:
> I am trying to read from to an IRC server that has an extra carriage return on their MOTD lines (e.g. "\015\015\012"). I assume this was caused by someone pasting text from a Windows editor or something.
> 
> This is wreaking havoc with AE::Handle's line based read type.

No, it'S not,m it's working as expected. The fix is already implemented as
well, by specifying your nonstandard line ending.

> but maybe this is worth solving in AE::Handle instead of adding a custom kludge to my local AE::IRC?

anyevent cannot guess that the server you use is buggy - you have to
specify that yourself. breaking other programs and protocols because of a
single broken program is never good.

> Maybe there is a reason for the \015 in there that I am missing,

Yeah, it works correct as it is, and breaks for everybody else with your
change - not a good tradeoff.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list