]> 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:38:11 +0000 (16:38 +0200)
commitfb46757c48159c0b34b4d68d0061f0df8cb6ef36
tree0592bfea754df7152ac83c8fa6ab30a1d9fcb6df
parentb6b019dddc898e17fbe439d8bf33bd85d2da3b81
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!

(manually cherry picked from commit a84f7dcee5a1b32c74188aa5374d30eddd24852b)
src/ngircd/conn.c
src/ngircd/parse.c