r3604 - branches/2.0/varnish-cache/lib/libvarnish
tfheen at projects.linpro.no
tfheen at projects.linpro.no
Thu Feb 5 11:37:46 CET 2009
Author: tfheen
Date: 2009-02-05 11:37:46 +0100 (Thu, 05 Feb 2009)
New Revision: 3604
Modified:
branches/2.0/varnish-cache/lib/libvarnish/vlu.c
Log:
Merge r3383: React to both NL and CR in VLU
Modified: branches/2.0/varnish-cache/lib/libvarnish/vlu.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/vlu.c 2009-02-05 10:34:00 UTC (rev 3603)
+++ branches/2.0/varnish-cache/lib/libvarnish/vlu.c 2009-02-05 10:37:46 UTC (rev 3604)
@@ -87,8 +87,11 @@
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);
More information about the varnish-commit
mailing list