MCPcopy Create free account
hub / github.com/apache/httpd / ap_proxy_worker_can_upgrade

Function ap_proxy_worker_can_upgrade

modules/proxy/proxy_util.c:1782–1797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1780}
1781
1782PROXY_DECLARE(int) ap_proxy_worker_can_upgrade(apr_pool_t *p,
1783 const proxy_worker *worker,
1784 const char *upgrade,
1785 const char *dflt)
1786{
1787 /* Find in worker->s->upgrade list (if any) */
1788 const char *worker_upgrade = worker->s->upgrade;
1789 if (*worker_upgrade) {
1790 return (strcmp(worker_upgrade, "*") == 0
1791 || ap_cstr_casecmp(worker_upgrade, upgrade) == 0
1792 || ap_find_token(p, worker_upgrade, upgrade));
1793 }
1794
1795 /* Compare to the provided default (if any) */
1796 return (dflt && ap_cstr_casecmp(dflt, upgrade) == 0);
1797}
1798
1799/*
1800 * Taken from ap_strcmp_match() :

Callers 3

proxy_http_handlerFunction · 0.85
proxy_wstunnel_handlerFunction · 0.85

Calls 2

ap_cstr_casecmpFunction · 0.85
ap_find_tokenFunction · 0.85

Tested by

no test coverage detected