MCPcopy Index your code
hub / github.com/apache/httpd / safe_referer

Function safe_referer

modules/proxy/mod_proxy_balancer.c:1114–1122  ·  view source on GitHub ↗

Returns non-zero if the Referer: header value passed matches the * host of the request. */

Source from the content-addressed store, hash-verified

1112/* Returns non-zero if the Referer: header value passed matches the
1113 * host of the request. */
1114static int safe_referer(request_rec *r, const char *ref)
1115{
1116 apr_uri_t uri;
1117
1118 if (apr_uri_parse(r->pool, ref, &uri) || !uri.hostname)
1119 return 0;
1120
1121 return strcasecmp(uri.hostname, ap_get_server_name(r)) == 0;
1122}
1123
1124/*
1125 * Process the paramters and add or update the worker of the

Callers 1

balancer_handlerFunction · 0.85

Calls 1

ap_get_server_nameFunction · 0.85

Tested by

no test coverage detected