]> arthur.barton.de Git - ngircd.git/commit
Allow mixed line terminations (CR+LF/CR/LF) in non-RFC-compliant mode
authorAlexander Barton <alex@barton.de>
Wed, 11 Jun 2008 14:00:38 +0000 (16:00 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 11 Jun 2008 14:00:38 +0000 (16:00 +0200)
commita84f7dcee5a1b32c74188aa5374d30eddd24852b
tree001e4f132c93ac41033608e8729f7ef56c85881d
parent8644cbf197807909e4caea184278872cdeca1963
Allow mixed line terminations (CR+LF/CR/LF) in non-RFC-compliant mode

Up to now ngIRCd accepted CR+LF as well as a single CR or LF in "non RFC
compliant" mode (the default). But ngIRCd became confused when it received
data containing mixed line endings (e. g. "111\r222\n333\r\n").

This patch enables ngIRCd (in "non RFC compliant" mode) to detect CR+LF,
CR, and LF as equally good line termination sequences and to always end the
command after the first one detected.

Some clients (for exmaple Trilian) are that ... broken to send such mixed
line terminations ...

First patch proposed by Scott Perry <scperry@ucsd.edu>,
Thanks to Ali Shemiran <ashemira@ucsd.edu> for testing!
src/ngircd/conn.c
src/ngircd/parse.c