summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Malo <nd@apache.org>2004-04-10 23:44:43 +0200
committerAndré Malo <nd@apache.org>2004-04-10 23:44:43 +0200
commit74fa214f4d2225895ce139628d9be65e421aa4f0 (patch)
tree23f58aa29c8188020f987d1671a018e3fc02d180
parentfix cache confusion which happens if different virtualhosts define (diff)
downloadapache2-74fa214f4d2225895ce139628d9be65e421aa4f0.tar.xz
apache2-74fa214f4d2225895ce139628d9be65e421aa4f0.zip
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
-rw-r--r--CHANGES4
-rw-r--r--server/core.c6
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, "<address>",
ap_get_server_version(),
- " Server at <a href=\"mailto:",
- r->server->server_admin, "\">",
+ " Server at <a href=\"",
+ ap_is_url(r->server->server_admin) ? "" : "mailto:",
+ ap_escape_html(r->pool, r->server->server_admin),
+ "\">",
ap_escape_html(r->pool, ap_get_server_name(r)),
"</a> Port ", sport,
"</address>\n", NULL);