Skip to content

Commit

Permalink
BUG/MEDIUM: promex: Wait to have the request before sending the response
Browse files Browse the repository at this point in the history
It is similar to the previous fix about the stats applet ("BUG/MEDIUM:
cache/stats: Wait to have the request before sending the response").
However, for promex, there is no crash and no obvious issue. But it depends
on the filter. Indeed, the request is used by promex, independantly if it
was considered as forwarded or not. So if it is modified by the filter,
modification are just ignored.

Same bug, same fix. We now wait the request was forwarded before processing
it and produce the response.

(cherry picked from commit bb2a2bc)
Signed-off-by: Christopher Faulet <[email protected]>
(cherry picked from commit 278ee5c)
Signed-off-by: Christopher Faulet <[email protected]>
(cherry picked from commit a13c86c)
Signed-off-by: Christopher Faulet <[email protected]>
  • Loading branch information
capflam committed Sep 17, 2024
1 parent d2b474f commit 1031d79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addons/promex/service-prometheus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,10 @@ static void promex_appctx_handle_io(struct appctx *appctx)

switch (appctx->st0) {
case PROMEX_ST_INIT:
if (!co_data(req)) {
applet_need_more_data(appctx);
goto out;
}
ret = promex_parse_uri(appctx, sc);
if (ret <= 0) {
if (ret == -1)
Expand Down

0 comments on commit 1031d79

Please sign in to comment.