httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1525000 - /httpd/httpd/trunk/server/vhost.c
Date Fri, 20 Sep 2013 13:36:33 GMT
Author: covener
Date: Fri Sep 20 13:36:33 2013
New Revision: 1525000

URL: http://svn.apache.org/r1525000
Log:
name-based vhosts listed twice with apachectl -S

When processing a vhost with * or _default_, we'd add the "names" once
for 0.0.0.0 and once for [::], but these are stored in the same "default"
ip chain.  Catch the back-to-back wildcard + same port and short-circuit the
second add.

Submitted By: rjung
Committed By: covener

Modified:
    httpd/httpd/trunk/server/vhost.c

Modified: httpd/httpd/trunk/server/vhost.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/vhost.c?rev=1525000&r1=1524999&r2=1525000&view=diff
==============================================================================
--- httpd/httpd/trunk/server/vhost.c (original)
+++ httpd/httpd/trunk/server/vhost.c Fri Sep 20 13:36:33 2013
@@ -587,7 +587,8 @@ AP_DECLARE(void) ap_fini_vhost_config(ap
                 ic = find_default_server(sar->host_port);
 
                 if (ic && sar->host_port == ic->sar->host_port) { /* we're
a match for an existing "default server"  */
-                    if (!sar_prev || memcmp(sar_prev->host_addr->ipaddr_ptr, inaddr_any,
sar_prev->host_addr->ipaddr_len)) { 
+                    if (!sar_prev || memcmp(sar_prev->host_addr->ipaddr_ptr, inaddr_any,
sar_prev->host_addr->ipaddr_len)
+                                  || sar_prev->host_port != sar->host_port) { 
                         add_name_vhost_config(p, main_s, s, sar, ic);
                     }
                 }



Mime
View raw message