You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2020/07/01 08:27:50 UTC
[Bug 64338] Expose balancer member state to origin / upstream server
https://bz.apache.org/bugzilla/show_bug.cgi?id=64338
--- Comment #9 from Yann Ylavic <yl...@gmail.com> ---
I'd suggest using the PROXY_WORKER_*_STAT characters or proxy_wstat_tbl strings
rather than the numeric/mask value. Something like this maybe:
static char *worker_status_str(apr_pool_t *p, const proxy_worker *worker)
{
apr_array_header_t *str = apr_array_make(p, 13, sizeof(char));
proxy_wstat_t *wstat = proxy_wstat_tbl;
while (wstat->flag) {
if (worker->s->status & wstat->bit) {
APR_ARRAY_PUSH(str, char) = wstat->flag;
}
wstat++;
}
APR_ARRAY_PUSH(str, char) = '\0';
return str->elts;
}
Regarding the X-Worker-Status header, possibly it could be conditional (opt-in)
to "ProxyAddWorkerHeaders on" or alike (similar to ProxyAddHeaders)? One does
not necessarily want to expose this information to the backend.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org