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
bb2a2bc5f2f6d864cd8770cbd2533d3df1878ad1)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
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)