]> granicus.if.org Git - apache/commitdiff
accept URLs as ServerAdmin contact. If it's not recognized as an URL, assume
authorAndré Malo <nd@apache.org>
Sat, 10 Apr 2004 21:44:43 +0000 (21:44 +0000)
committerAndré Malo <nd@apache.org>
Sat, 10 Apr 2004 21:44:43 +0000 (21:44 +0000)
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
server/core.c

diff --git a/CHANGES b/CHANGES
index 782f07eb43ad7f5b23aa4ffc1a63ad17de0c2874..fdfa32ca95d9921d3a49bb15b6aa7660a061883a 100644 (file)
--- 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]
index ff1b1afaef4518bd765c686e86c9f8e027813f5d..36641189ef78472476043ccf4a10dd243405f041 100644 (file)
@@ -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);