r2351 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Jan 16 15:49:28 CET 2008


Author: phk
Date: 2008-01-16 15:49:27 +0100 (Wed, 16 Jan 2008)
New Revision: 2351

Modified:
   trunk/varnish-cache/bin/varnishd/cache_http.c
Log:
Make the destination pointer optional to http_GetHdr(), we might just
want to know if the header is there at all.


Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c	2008-01-16 11:44:30 UTC (rev 2350)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c	2008-01-16 14:49:27 UTC (rev 2351)
@@ -233,10 +233,12 @@
 		*ptr = NULL;
 		return (0);
 	}
-	p = hp->hd[u].b + l;
-	while (isspace(*p))
-		p++;
-	*ptr = p;
+	if (ptr != NULL) {
+		p = hp->hd[u].b + l;
+		while (isspace(*p))
+			p++;
+		*ptr = p;
+	}
 	return (1);
 }
 




More information about the varnish-commit mailing list