From 74fa214f4d2225895ce139628d9be65e421aa4f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Malo?= Date: Sat, 10 Apr 2004 21:44:43 +0000 Subject: [PATCH] accept URLs as ServerAdmin contact. If it's not recognized as an URL, assume an email address and prepend it with mailto: in server outputs. PR: 28174 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103339 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ server/core.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 782f07eb43..fdfa32ca95 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) Accept URLs for the ServerAdmin directive. If the supplied + argument is not recognized as an URL, assume it's a mail address. + PR 28174. [André Malo] + *) mod_rewrite no longer confuses the RewriteMap caches if different maps defined in different virtual hosts use the same map name. PR 26462. [André Malo] diff --git a/server/core.c b/server/core.c index ff1b1afaef..36641189ef 100644 --- a/server/core.c +++ b/server/core.c @@ -2322,8 +2322,10 @@ AP_DECLARE(const char *) ap_psignature(const char *prefix, request_rec *r) if (conf->server_signature == srv_sig_withmail) { return apr_pstrcat(r->pool, prefix, "
", ap_get_server_version(), - " Server at server->server_admin, "\">", + " Server at server->server_admin) ? "" : "mailto:", + ap_escape_html(r->pool, r->server->server_admin), + "\">", ap_escape_html(r->pool, ap_get_server_name(r)), " Port ", sport, "
\n", NULL); -- 2.50.1