httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@organic.com>
Subject Patch to keep-alive config
Date Fri, 28 Jun 1996 19:00:37 GMT
Following is a patch to make KeepAlive and KeepAliveTimeout more like the
rest of the server-config directives, in that unless specifically
overrided, a virtual host will inherit the main server's settings. This is
especially useful if you want, for some reason (as did a user who sent in
a bug report recently) to disable persistent connections throughout the
entire server.

I'd call this a bug fix, and I'd like to put this patch into 1.1. Anyone
feel like objecting (to this patch, I mean, not in general)?

Index: http_config.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_config.c,v
retrieving revision 1.11
diff -c -r1.11 http_config.c
*** http_config.c	1996/06/07 17:39:23	1.11
--- http_config.c	1996/06/28 18:57:06
***************
*** 652,659 ****
      s->srm_confname = NULL;
      s->access_confname = NULL;
      s->timeout = 0;
!     s->keep_alive_timeout = DEFAULT_KEEPALIVE_TIMEOUT;
!     s->keep_alive = DEFAULT_KEEPALIVE;
      s->host_addr.s_addr = get_virthost_addr (hostname, &s->host_port);
      s->port = s->host_port;  /* set them the same, by default */
      s->next = NULL;
--- 652,659 ----
      s->srm_confname = NULL;
      s->access_confname = NULL;
      s->timeout = 0;
!     s->keep_alive_timeout = 0;
!     s->keep_alive = 0;
      s->host_addr.s_addr = get_virthost_addr (hostname, &s->host_port);
      s->port = s->host_port;  /* set them the same, by default */
      s->next = NULL;
***************
*** 699,704 ****
--- 699,710 ----
  
  	if (virt->timeout == 0)
  	    virt->timeout = main_server->timeout;
+ 
+ 	if (virt->keep_alive_timeout == 0)
+ 	    virt->keep_alive_timeout = main_server->keep_alive_timeout;
+ 
+ 	if (virt->keep_alive == 0)
+ 	    virt->keep_alive = main_server->keep_alive;
      }
  }
  


-- Alexei Kosut <akosut@organic.com>            The Apache HTTP Server 
   http://www.nueva.pvt.k12.ca.us/~akosut/      http://www.apache.org/


Mime
View raw message