From: William Lallemand Date: Mon, 20 Nov 2017 18:13:14 +0000 (+0100) Subject: MEDIUM: cache: enable the HTTP analysers X-Git-Tag: v1.8.0~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71bd11a1f3764d693adc38b9667482a0e31a09fe;p=thirdparty%2Fhaproxy.git MEDIUM: cache: enable the HTTP analysers Enable the same analysers as the stats applet. Allows keepalive and termination flags to work. --- diff --git a/include/types/cache.h b/include/types/cache.h index 55f3503c5c..3c43006525 100644 --- a/include/types/cache.h +++ b/include/types/cache.h @@ -1,6 +1,7 @@ #ifndef _TYPES_CACHE_H #define _TYPES_CACHE_H +struct applet http_cache_applet; #endif /*_TYPES_CACHE_H */ diff --git a/src/proto_http.c b/src/proto_http.c index 88e2f06ebb..641145b2c5 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -3488,7 +3489,8 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s /* Proceed with the stats now. */ - if (unlikely(objt_applet(s->target) == &http_stats_applet)) { + if (unlikely(objt_applet(s->target) == &http_stats_applet) || + unlikely(objt_applet(s->target) == &http_cache_applet)) { /* process the stats request now */ if (sess->fe == s->be) /* report it if the request was intercepted by the frontend */ HA_ATOMIC_ADD(&sess->fe->fe_counters.intercepted_req, 1);