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

Function balancer_fixup

modules/proxy/mod_proxy_balancer.c:405–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403}
404
405static int balancer_fixup(request_rec *r, proxy_worker *worker, char **url)
406{
407 const char *path;
408 int rc;
409
410 /* Build the proxy URL from the worker URL and the actual path */
411 path = strstr(*url, "://");
412 if (path) {
413 path = ap_strchr_c(path + 3, '/');
414 }
415 r->filename = apr_pstrcat(r->pool, "proxy:", worker->s->name_ex, path, NULL);
416
417 /* Canonicalize r->filename per the worker scheme's canon_handler hook */
418 rc = ap_proxy_canon_url(r);
419 if (rc == OK) {
420 AP_DEBUG_ASSERT(strncmp(r->filename, "proxy:", 6) == 0);
421 *url = apr_pstrdup(r->pool, r->filename + 6);
422 }
423 return rc;
424}
425
426static void force_recovery(proxy_balancer *balancer, server_rec *s)
427{

Callers 1

Calls 2

ap_strchr_cFunction · 0.85
ap_proxy_canon_urlFunction · 0.85

Tested by

no test coverage detected