From: phk Date: Tue, 11 Nov 2008 13:15:01 +0000 (+0000) Subject: React to both NL and CR in VLU X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=918a01ebd8b11b190e8b8794d52e861708e28b7c;p=varnish React to both NL and CR in VLU git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3383 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvarnish/vlu.c b/varnish-cache/lib/libvarnish/vlu.c index 7a3925bb..f463546b 100644 --- a/varnish-cache/lib/libvarnish/vlu.c +++ b/varnish-cache/lib/libvarnish/vlu.c @@ -87,8 +87,11 @@ LineUpProcess(struct vlu *l) l->buf[l->bufp] = '\0'; for (p = l->buf; *p != '\0'; p = q) { - q = strchr(p, '\n'); - if (q == NULL) + /* Find first CR or NL */ + for (q = p; *q != '\0'; q++) + if (*q == '\n' || *q == '\r') + break; + if (*q == '\0') break; *q++ = '\0'; i = l->func(l->priv, p);