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

Function ap_psignature

server/core.c:3524–3554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3522}
3523
3524AP_DECLARE(const char *) ap_psignature(const char *prefix, request_rec *r)
3525{
3526 char sport[20];
3527 core_dir_config *conf;
3528
3529 conf = (core_dir_config *)ap_get_core_module_config(r->per_dir_config);
3530 if ((conf->server_signature == srv_sig_off)
3531 || (conf->server_signature == srv_sig_unset)) {
3532 return "";
3533 }
3534
3535 apr_snprintf(sport, sizeof sport, "%u", (unsigned) ap_get_server_port(r));
3536
3537 if (conf->server_signature == srv_sig_withmail) {
3538 return apr_pstrcat(r->pool, prefix, "<address>",
3539 ap_get_server_banner(),
3540 " Server at <a href=\"",
3541 ap_is_url(r->server->server_admin) ? "" : "mailto:",
3542 ap_escape_html(r->pool, r->server->server_admin),
3543 "\">",
3544 ap_escape_html(r->pool, ap_get_server_name(r)),
3545 "</a> Port ", sport,
3546 "</address>\n", NULL);
3547 }
3548
3549 return apr_pstrcat(r->pool, prefix, "<address>", ap_get_server_banner(),
3550 " Server at ",
3551 ap_escape_html(r->pool, ap_get_server_name(r)),
3552 " Port ", sport,
3553 "</address>\n", NULL);
3554}
3555
3556/*
3557 * Handle a request to include the server's OS platform in the Server

Callers 8

dav_error_responseFunction · 0.85
ap_send_error_responseFunction · 0.85
balancer_display_pageFunction · 0.85
proxy_send_dir_filterFunction · 0.85
emit_tailFunction · 0.85
display_infoFunction · 0.85
status_handlerFunction · 0.85
ap_add_common_varsFunction · 0.85

Calls 5

ap_get_server_portFunction · 0.85
ap_get_server_bannerFunction · 0.85
ap_is_urlFunction · 0.85
ap_get_server_nameFunction · 0.85

Tested by

no test coverage detected