httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52532] New: VirtualHost added TWICE to name-virtual-host list when multiple names resolve to same IP address.
Date Thu, 26 Jan 2012 00:02:32 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52532

             Bug #: 52532
           Summary: VirtualHost added TWICE to name-virtual-host list when
                    multiple names resolve to same IP address.
           Product: Apache httpd-2
           Version: 2.2.21
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P4
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: software+apache-httpd@kd6lvw.ampr.org
    Classification: Unclassified


Example:

<VirtualHost www.example.com:80 www.example.org:80>
    ServerName  www.example.com
    ServerAlias www.example.org
...
These two hostnames share an IP address.


When more than one hostname resolves to a given address, the virtual host
section is added to that address' name-virtual-host chain more than once.
Result:

192.0.2.1:80       is a NameVirtualHost
         default server ... 
         port 80 namevhost www.example.com (.../httpd.conf:line-X)
         port 80 namevhost www.example.com (.../httpd.conf:line-X)

This problem does not affect the end-result operation of named virtual host
resolution.  However, having the same entry appear more than once in a given
NVH chain does cause unnecessary and duplicate comparisons (when the NVH isn't
matched via its ServerName, ServerAlias, or ServerPath values).

Solution:  One should check the existing NVH chain to see if the entry being
added is already on that list before adding it.  I have not even looked at the
code so I leave that for someone else more familiar with apache to deal with.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message