]> granicus.if.org Git - apache/commitdiff
Revert fix for PR54948 (http://svn.apache.org/viewvc?view=revision&revision=1485675)
authorJim Jagielski <jim@apache.org>
Mon, 15 Jul 2013 11:50:50 +0000 (11:50 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 15 Jul 2013 11:50:50 +0000 (11:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1503188 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/vhost.c

diff --git a/CHANGES b/CHANGES
index b8618e27107cc88bfec270ebbb20e6f8be160864..004200510f444f034cef38f79f2bd2f752875b22 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -154,9 +154,6 @@ Changes with Apache 2.4.5
   *) mod_dav: Ensure URI is correctly uriencoded on return. PR 54611
      [Timothy Wood <tjw omnigroup.com>]
 
-  *) core: apachectl -S prints wildcard name-based virtual hosts twice. 
-     PR54948 [Eric Covener]
-
   *) mod_proxy: Reject invalid values for Max-Forwards. [Graham Leggett,
      Co-Advisor <coad measurement-factory.com>]
 
index f8f41a033b3cd84fe9bd0b9778d254e45e0055f3..fd7c0ad646d8097a5d9cc34bc731621f78f7a068 100644 (file)
@@ -577,21 +577,14 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s)
      */
 
     for (s = main_s->next; s; s = s->next) {
-        server_addr_rec *sar_prev = NULL;
         has_default_vhost_addr = 0;
         for (sar = s->addrs; sar; sar = sar->next) {
             ipaddr_chain *ic;
             char inaddr_any[16] = {0}; /* big enough to handle IPv4 or IPv6 */
-            /* XXX: this treats 0.0.0.0 as a "default" server which matches no-exact-match for IPv6 */
+
             if (!memcmp(sar->host_addr->ipaddr_ptr, inaddr_any, sar->host_addr->ipaddr_len)) {
                 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)) { 
-                        add_name_vhost_config(p, main_s, s, sar, ic);
-                    }
-                }
-                else { 
+                if (!ic || sar->host_port != ic->sar->host_port) {
                     /* No default server, or we found a default server but
                     ** exactly one of us is a wildcard port, which means we want
                     ** two ip-based vhosts not an NVH with two names
@@ -599,7 +592,6 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s)
                     ic = new_ipaddr_chain(p, s, sar);
                     ic->next = default_list;
                     default_list = ic;
-                    add_name_vhost_config(p, main_s, s, sar, ic);
                 }
                 has_default_vhost_addr = 1;
             }
@@ -617,9 +609,8 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s)
                     ic->next = *iphash_table_tail[bucket];
                     *iphash_table_tail[bucket] = ic;
                 }
-                add_name_vhost_config(p, main_s, s, sar, ic);
             }
-            sar_prev = sar;
+            add_name_vhost_config(p, main_s, s, sar, ic);
         }
 
         /* Ok now we want to set up a server_hostname if the user was