1 commit 3a00e5fcc1af121dea16793d47627c16c97fb953
2 Author: Christopher Faulet <cfaulet@haproxy.com>
3 Date: Wed Nov 27 11:22:37 2019 +0100
5 BUG/MINOR: contrib/prometheus-exporter: Use HTX errors and not legacy ones
7 This bug was introduced when the commit 32d634f1 ("MINOR:
8 contrib/prometheus-exporter: filter exported metrics by scope") was backported
11 In 2.0, Error chunks exist in raw format (http_err_chunks[]) and in HTX format
12 (htx_err_chunks[]). Prometheus exported only supports the HTX. So error must not
13 be reported using the raw chunks.
15 This fix is specific to 2.0. No backport needed.
17 diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c
18 index 56d49a39..cfbfb8c3 100644
19 --- a/contrib/prometheus-exporter/service-prometheus.c
20 +++ b/contrib/prometheus-exporter/service-prometheus.c
21 @@ -2292,7 +2292,7 @@ static int promex_parse_uri(struct appctx *appctx, struct stream_interface *si)
25 - err = &http_err_chunks[HTTP_ERR_400];
26 + err = &htx_err_chunks[HTTP_ERR_400];
28 res->buf.data = b_data(err);
29 memcpy(res->buf.area, b_head(err), b_data(err));