]> err.no Git - varnish/commitdiff
React to both NL and CR in VLU
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 11 Nov 2008 13:15:01 +0000 (13:15 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 11 Nov 2008 13:15:01 +0000 (13:15 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3383 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvarnish/vlu.c

index 7a3925bb7bcfd7253b7292f6ebb94b59e3c371bf..f463546bae99d9e2520558e3ae885f1dbba0e4f8 100644 (file)
@@ -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);