You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/07/14 22:18:00 UTC
cvs commit: apache-1.3/src/main util.c
wrowe 00/07/14 13:18:00
Modified: src/main util.c
Log:
Restore the behavior of the default ServerName to not advertise any
assumptions if it locates a legitimate dotted/fully qualified domain
name from tcp/ip. Retains advertising of any ServerName that fell
through to a dotted ip address name, or the loopback address.
Resolves concerns (I hope) of Jeff, Ken and others.
Revision Changes Path
1.184 +7 -1 apache-1.3/src/main/util.c
Index: util.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/util.c,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- util.c 2000/06/15 13:44:49 1.183
+++ util.c 2000/07/14 20:17:59 1.184
@@ -1998,15 +1998,21 @@
if (!str && p->h_addr_list[0]) {
ap_snprintf(str, sizeof(str), "%pA", p->h_addr_list[0]);
server_hostname = ap_pstrdup(a, str);
+ /* We will drop through to report the IP-named server */
}
}
+ else
+ /* Since we found a fdqn, return it with no logged message. */
+ return server_hostname;
}
+ /* If we don't have an fdqn or IP, fall back to the loopback addr */
if (!server_hostname)
server_hostname = ap_pstrdup(a, "127.0.0.1");
ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, NULL,
- "%s: Missing ServerName directive, assumed host name %s\n",
+ "%s: Could not find determine the server's fully qualified "
+ "domain name, using %s for ServerName\n",
ap_server_argv0, server_hostname);
return server_hostname;