]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: cache: enable the HTTP analysers
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 20 Nov 2017 18:13:14 +0000 (19:13 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 20 Nov 2017 18:22:27 +0000 (19:22 +0100)
Enable the same analysers as the stats applet.
Allows keepalive and termination flags to work.

include/types/cache.h
src/proto_http.c

index 55f3503c5cafd7e6138befd25a906d1d12f5b233..3c4300652571bc3576719fadd99783b5f0808292 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _TYPES_CACHE_H
 #define _TYPES_CACHE_H
 
+struct applet http_cache_applet;
 
 #endif /*_TYPES_CACHE_H */
 
index 88e2f06ebbd3fa8a562f2ccb70edb905f60d14dc..641145b2c5d88f7882e979a63c2c82b94cffa6a0 100644 (file)
@@ -42,6 +42,7 @@
 #include <types/cli.h>
 #include <types/filters.h>
 #include <types/global.h>
+#include <types/cache.h>
 #include <types/stats.h>
 
 #include <proto/acl.h>
@@ -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);