httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Fielding <field...@hyperreal.com>
Subject cvs commit: apache/src CHANGES httpd.h http_main.c http_config.c
Date Tue, 11 Mar 1997 06:04:43 GMT
fielding    97/03/10 22:04:42

  Modified:    src       CHANGES httpd.h http_main.c http_config.c
  Log:
  Improved handling of IP address as a virtualhost address and
  introduced "_default_" as a synonym for the default vhost config.
  
  Submitted by: Dean Gaudet, PR #212
  Reviewed by: Roy Fielding, Chuck Murcko
  
  Revision  Changes    Path
  1.196     +4 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.195
  retrieving revision 1.196
  diff -C3 -r1.195 -r1.196
  *** CHANGES	1997/03/11 03:41:41	1.195
  --- CHANGES	1997/03/11 06:04:38	1.196
  ***************
  *** 52,57 ****
  --- 52,61 ----
    
      *) Clear memory allocated for listeners. [Randy Terbush]
    
  +   *) Improved handling of IP address as a virtualhost address and
  +      introduced "_default_" as a synonym for the default vhost config.
  +      [Dean Gaudet] PR #212
  + 
    Changes with Apache 1.2b7
    
      *) Port to  UXP/DS(V20) [Toshiaki Nomura <nom@yk.fujitsu.co.jp>]
  
  
  
  1.91      +5 -0      apache/src/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/httpd.h,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -C3 -r1.90 -r1.91
  *** httpd.h	1997/02/22 00:47:32	1.90
  --- httpd.h	1997/03/11 06:04:39	1.91
  ***************
  *** 551,556 ****
  --- 551,561 ----
    
    /* Per-vhost config... */
    
  + /* The address 255.255.255.255, when used as a virtualhost address,
  +  * will become the "default" server when the ip doesn't match other vhosts.
  +  */
  + #define DEFAULT_VHOST_ADDR 0xfffffffful
  + 
    typedef struct server_addr_rec server_addr_rec;
    struct server_addr_rec {
        server_addr_rec *next;
  
  
  
  1.128     +0 -5      apache/src/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.127
  retrieving revision 1.128
  diff -C3 -r1.127 -r1.128
  *** http_main.c	1997/03/04 21:44:38	1.127
  --- http_main.c	1997/03/11 06:04:39	1.128
  ***************
  *** 176,186 ****
    
    int one_process = 0;
    
  - /* The address 255.255.255.255, when used as a virtualhost address,
  -  * will become the "default" server when the ip doesn't match other vhosts.
  -  */
  - #define DEFAULT_VHOST_ADDR 0xfffffffful
  - 
    #if defined(USE_FCNTL_SERIALIZED_ACCEPT)
    static struct flock lock_it = { F_WRLCK, 0, 0, 0 };
    static struct flock unlock_it = { F_UNLCK, 0, 0, 0 };
  --- 176,181 ----
  
  
  
  1.44      +15 -14    apache/src/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_config.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -C3 -r1.43 -r1.44
  *** http_config.c	1997/03/10 09:19:39	1.43
  --- http_config.c	1997/03/11 06:04:40	1.44
  ***************
  *** 855,861 ****
        unsigned long my_addr;
        server_addr_rec *sar;
        char *t;
  !     int i;
    
        if( *w == 0 ) return;
    
  --- 855,861 ----
        unsigned long my_addr;
        server_addr_rec *sar;
        char *t;
  !     int i, is_an_ip_addr;
    
        if( *w == 0 ) return;
    
  ***************
  *** 871,893 ****
    	*t = 0;
        }
    
        if (strcmp(w, "*") == 0) {
  ! 	sar = pcalloc( p, sizeof( server_addr_rec ) );
  ! 	**paddr = sar;
  ! 	*paddr = &sar->next;
  ! 	sar->host_addr.s_addr = htonl(INADDR_ANY);
  ! 	sar->host_port = port;
  ! 	sar->virthost = pstrdup(p, w);
  ! 	if (t != NULL) *t = ':';
  ! 	return;
  !     }
  ! 
    #ifdef DGUX
  !     my_addr = inet_network(w);
    #else
  !     my_addr = inet_addr(w);
    #endif
  !     if (my_addr != INADDR_NONE) {
    	sar = pcalloc( p, sizeof( server_addr_rec ) );
    	**paddr = sar;
    	*paddr = &sar->next;
  --- 871,894 ----
    	*t = 0;
        }
    
  +     is_an_ip_addr = 0;
        if (strcmp(w, "*") == 0) {
  ! 	my_addr = htonl(INADDR_ANY);
  ! 	is_an_ip_addr = 1;
  !     } else if( strcmp(w, "_default_") == 0
  ! 	    || strcmp(w, "255.255.255.255") == 0 ) {
  ! 	my_addr = DEFAULT_VHOST_ADDR;
  ! 	is_an_ip_addr = 1;
  !     } else if(
    #ifdef DGUX
  ! 	    ( my_addr = inet_network(w) )
    #else
  ! 	    ( my_addr = inet_addr(w) )
    #endif
  ! 	    != INADDR_NONE ) {
  ! 	is_an_ip_addr = 1;
  !     }
  !     if( is_an_ip_addr ) {
    	sar = pcalloc( p, sizeof( server_addr_rec ) );
    	**paddr = sar;
    	*paddr = &sar->next;
  
  
  

Mime
View raw message