Commit ac980052 authored by Nils Goroll's avatar Nils Goroll

check if varnish gives us http_IsHdr

parent a0e8bf36
...@@ -70,6 +70,11 @@ if test "x$VMODDIR" = x; then ...@@ -70,6 +70,11 @@ if test "x$VMODDIR" = x; then
fi fi
fi fi
save_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} -I${VARNISHSRC}/include -I${VARNISHSRC}/bin/varnishd"
AC_CHECK_DECLS([http_IsHdr], [], [], [#include "cache.h"])
CPPFLAGS="${save_CPPFLAGS}"
# This corresponds to FreeBSD's WARNS level 6 # This corresponds to FreeBSD's WARNS level 6
DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes \ DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes \
-Wmissing-prototypes \ -Wmissing-prototypes \
......
...@@ -75,6 +75,7 @@ vrt_selecthttp(const struct sess *sp, enum gethdr_e where) ...@@ -75,6 +75,7 @@ vrt_selecthttp(const struct sess *sp, enum gethdr_e where)
return (hp); return (hp);
} }
#if (HAVE_DECL_HTTP_ISHDR != 1)
static int static int
http_IsHdr(const txt *hh, const char *hdr) http_IsHdr(const txt *hh, const char *hdr)
{ {
...@@ -88,6 +89,7 @@ http_IsHdr(const txt *hh, const char *hdr) ...@@ -88,6 +89,7 @@ http_IsHdr(const txt *hh, const char *hdr)
hdr++; hdr++;
return (!strncasecmp(hdr, hh->b, l)); return (!strncasecmp(hdr, hh->b, l));
} }
#endif
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
* our own per-session workspaces for modifications of the http0 object. * our own per-session workspaces for modifications of the http0 object.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment