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

Function ap_get_server_name_for_url

server/core.c:1187–1197  ·  view source on GitHub ↗

* Get the current server name from the request for the purposes * of using in a URL. If the server name is an IPv6 literal * address, it will be returned in URL format (e.g., "[fe80::1]"). */

Source from the content-addressed store, hash-verified

1185 * address, it will be returned in URL format (e.g., "[fe80::1]").
1186 */
1187AP_DECLARE(const char *) ap_get_server_name_for_url(request_rec *r)
1188{
1189 const char *plain_server_name = ap_get_server_name(r);
1190
1191#if APR_HAVE_IPV6
1192 if (ap_strchr_c(plain_server_name, ':')) { /* IPv6 literal? */
1193 return apr_pstrcat(r->pool, "[", plain_server_name, "]", NULL);
1194 }
1195#endif
1196 return plain_server_name;
1197}
1198
1199AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r)
1200{

Callers 11

ssl_var_lookupFunction · 0.85
md_require_https_maybeFunction · 0.85
fully_qualify_uriFunction · 0.85
lookup_variableFunction · 0.85
hook_uri2fileFunction · 0.85
ssl_var_lookupFunction · 0.85
ap_add_common_varsFunction · 0.85
request_var_fnFunction · 0.85
ap_construct_urlFunction · 0.85
http_core.hFile · 0.85

Calls 2

ap_get_server_nameFunction · 0.85
ap_strchr_cFunction · 0.85

Tested by

no test coverage detected