]> err.no Git - varnish/commitdiff
Make the destination pointer optional to http_GetHdr(), we might just
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 16 Jan 2008 14:49:27 +0000 (14:49 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 16 Jan 2008 14:49:27 +0000 (14:49 +0000)
want to know if the header is there at all.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2351 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_http.c

index 9684bcee33746cbec6d4d04ca8708a4134fa6ec0..e8a9f7a7bfcf8f258ba5b80402659754d6141ec0 100644 (file)
@@ -233,10 +233,12 @@ http_GetHdr(const struct http *hp, const char *hdr, char **ptr)
                *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);
 }