httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Korthof ...@organic.com>
Subject Re: vhost stuff
Date Fri, 30 May 1997 06:21:52 GMT
Thanks Dean.  All the things you mentioned should be fixed; I've put
together a patch which does so, and which might go in 1.2.1; I want to
test it out a bit more, though.

I'd kind of like to overhaul more of the vhosts handling stuff;
significant optimization is possible, and there are some things which may
be considered bugs which could be fixed.  But that can wait till later.

Thanks again to Dean and Roy for looking over my patches; I wasn't very
familiar with this section of code, but wanted to at least improve it.

     -- Ed Korthof        |  Web Server Engineer --
     -- ed@organic.com    |  Organic Online, Inc --
     -- (415) 278-5676    |  Fax: (415) 284-6891 --

On Wed, 28 May 1997, Dean Gaudet wrote:
> Just a brief peek at your patch.
> On Wed, 28 May 1997, Ed Korthof wrote:
> > !   /* port is never 0 (unless the client sent 'Host: hostname:0', which makes
> > !    * no sense.  If this server used a wildcard port, then r->server->port
> > !    * is the default port of the main server, and r->server->addrs->host_port
> > !    * is 0.  Also, for the main server, host_port is 0.
> > !    * So if is not the main server, and r->server->addrs->host_port ==
0,
> > !    * then it's a wild card port.  But if it is the main server, we should
> > !    * try aliases anyway since name-based vhosts haven't been scaned yet.
> > !    */
> > !   if ( (port != r->server->port) && (r->server->addrs->host_port
!= 0) )
> >       return;
> 
> r->server->addrs == NULL if all DNS lookups failed for the <VirtualHost>
> directive.
>
> It looks wrong to just compare the first port too.  Consider:
> 
> <VirtualHost 1.1.1.1:80 2.2.2.2:8080>
> </VirtualHost>
>
> > !     /* Now we try to match against ServerName, if configured.
> > !      * Note that only the last ServerName per server is used.  Again,
> > !      * ports may not match if this server uses a wildcard port.
> > !      */
> > ! 
> > !     if ((!strcasecmp(host, s->server_hostname)) && 
> > !          ( (port == s->port) || (s->addrs->host_port == 0) ) ) {
> 
> Similar comment to above.
> 
> Dean












Mime
View raw message