From 918a01ebd8b11b190e8b8794d52e861708e28b7c Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 11 Nov 2008 13:15:01 +0000 Subject: [PATCH] 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 --- varnish-cache/lib/libvarnish/vlu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 2.39.5