mjc 96/09/24 05:21:16
Modified: src http_main.c Log: Submitted-by: [EMAIL PROTECTED] Reviewed-by: [EMAIL PROTECTED], [EMAIL PROTECTED] Fixes virtual hosts on main IP address where the port address is not the same as the "Port" command. Revision Changes Path 1.71 +4 -2 apache/src/http_main.c Index: http_main.c =================================================================== RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.70 retrieving revision 1.71 diff -C3 -r1.70 -r1.71 *** http_main.c 1996/09/23 20:38:52 1.70 --- http_main.c 1996/09/24 12:21:14 1.71 *************** *** 50,56 **** * */ ! /* $Id: http_main.c,v 1.70 1996/09/23 20:38:52 jim Exp $ */ /* * httpd.c: simple http daemon for answering WWW file requests --- 50,56 ---- * */ ! /* $Id: http_main.c,v 1.71 1996/09/24 12:21:14 mjc Exp $ */ /* * httpd.c: simple http daemon for answering WWW file requests *************** *** 1263,1268 **** --- 1263,1269 ---- int n; server_addr_rec *sar; int has_inaddr_any; + int mainport = s->port; /* Main host first */ *************** *** 1287,1293 **** for (n = 0; main->h_addr_list[n] != NULL; n++) { for(sar = s->addrs; sar; sar = sar->next) { if (sar->host_addr.s_addr == ! (((struct in_addr *)(main->h_addr_list[n]))->s_addr)) s->is_virtual = 2; if( sar->host_addr.s_addr == htonl(INADDR_ANY) ) { has_inaddr_any = 1; --- 1288,1295 ---- for (n = 0; main->h_addr_list[n] != NULL; n++) { for(sar = s->addrs; sar; sar = sar->next) { if (sar->host_addr.s_addr == ! (((struct in_addr *)(main->h_addr_list[n]))->s_addr) && ! s->port == mainport) s->is_virtual = 2; if( sar->host_addr.s_addr == htonl(INADDR_ANY) ) { has_inaddr_any = 1;