MINOR: htx: Add a flag on HTX to known when a response was generated by HAProxy
The flag HTX_FL_PROXY_RESP is now set on responses generated by HAProxy,
excluding responses returned by applets and services. It is an informative flag
set by the applicative layer.
diff --git a/src/http_ana.c b/src/http_ana.c
index f1546fd..c16d61f 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -2527,6 +2527,7 @@
/* let's log the request time */
s->logs.tv_request = now;
+ htx->flags |= HTX_FL_PROXY_RESP;
data = htx->data - co_data(res);
c_adv(res, data);
res->total += data;
@@ -4879,6 +4880,7 @@
chn->buf.data = msg->data;
memcpy(chn->buf.area, msg->area, msg->data);
htx = htx_from_buf(&chn->buf);
+ htx->flags |= HTX_FL_PROXY_RESP;
c_adv(chn, htx->data);
chn->total += htx->data;
}
@@ -4909,6 +4911,7 @@
chn->buf.data = msg->data;
memcpy(chn->buf.area, msg->area, msg->data);
htx = htx_from_buf(&chn->buf);
+ htx->flags |= HTX_FL_PROXY_RESP;
c_adv(chn, htx->data);
chn->total += htx->data;
}
@@ -5103,6 +5106,7 @@
if (!htx_add_endof(htx, HTX_BLK_EOM))
goto fail;
+ htx->flags |= HTX_FL_PROXY_RESP;
data = htx->data - co_data(res);
c_adv(res, data);
res->total += data;