diff --git a/src/proto_http.c b/src/proto_http.c index bd6a15a88..637396697 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2639,8 +2639,7 @@ 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) || - unlikely(objt_applet(s->target) == &http_cache_applet)) { + if (unlikely(objt_applet(s->target))) { /* 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); diff --git a/src/proto_htx.c b/src/proto_htx.c index 9a06419b1..9e0a13564 100644 --- a/src/proto_htx.c +++ b/src/proto_htx.c @@ -612,10 +612,8 @@ int htx_process_req_common(struct stream *s, struct channel *req, int an_bit, st goto return_bad_req; } - /* Proceed with the stats now. */ - if (unlikely(objt_applet(s->target) == &http_stats_applet) || - unlikely(objt_applet(s->target) == &http_cache_applet)) { - /* process the stats request now */ + /* Proceed with the applets now. */ + if (unlikely(objt_applet(s->target))) { 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); diff --git a/src/stream.c b/src/stream.c index af3e1177f..d4cda4bc8 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1207,15 +1207,6 @@ enum act_return process_use_service(struct act_rule *rule, struct proxy *px, appctx = si_appctx(&s->si[1]); memset(&appctx->ctx, 0, sizeof(appctx->ctx)); appctx->rule = rule; - - /* enable the minimally required analyzers in case of HTTP - * keep-alive to properly handle keep-alive and compression - * on the HTTP response. - */ - if (rule->from == ACT_F_HTTP_REQ) { - s->req.analysers &= AN_REQ_FLT_HTTP_HDRS | AN_REQ_FLT_END; - s->req.analysers |= AN_REQ_HTTP_XFER_BODY; - } } else appctx = si_appctx(&s->si[1]); @@ -1233,16 +1224,17 @@ enum act_return process_use_service(struct act_rule *rule, struct proxy *px, default: return ACT_RET_YIELD; } + if (rule->from != ACT_F_HTTP_REQ) { + 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); + + /* The flag SF_ASSIGNED prevent from server assignment. */ + s->flags |= SF_ASSIGNED; + } + /* Now we can schedule the applet. */ si_cant_get(&s->si[1]); appctx_wakeup(appctx); - - 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); - - /* The flag SF_ASSIGNED prevent from server assignment. */ - s->flags |= SF_ASSIGNED; - return ACT_RET_STOP; }