httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: apache-1.3/src/main http_protocol.c
Date Sat, 28 Aug 2004 15:07:43 GMT
jim         2004/08/28 08:07:43

  Modified:    src/main http_protocol.c
  Log:
  To be honest, I'd prefer testing being done to this version instead
  since this is likely the "best" solution without more intrusive
  changes... Folding this in makes it easier to test and hopefully
  provide better feedback if we still want to try for a release soon.
  
  Revision  Changes    Path
  1.337     +6 -5      apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.336
  retrieving revision 1.337
  diff -u -r1.336 -r1.337
  --- http_protocol.c	27 Aug 2004 23:44:41 -0000	1.336
  +++ http_protocol.c	28 Aug 2004 15:07:42 -0000	1.337
  @@ -391,7 +391,6 @@
       int wimpy = ap_find_token(r->pool,
                              ap_table_get(r->headers_out, "Connection"), "close");
       const char *conn = ap_table_get(r->headers_in, "Connection");
  -    const char *herebefore = ap_table_get(r->notes, "ap_set_keepalive-called");
   
       /* The following convoluted conditional determines whether or not
        * the current connection should remain persistent after this response
  @@ -442,17 +441,19 @@
          ) {
           int left = r->server->keep_alive_max - r->connection->keepalives;
   
  -        r->connection->keepalive = 1;
   	/*
   	 * ap_set_keepalive could be called multiple times (eg: in
   	 * ap_die() followed by ap_send_http_header()) during this
   	 * one single request. To ensure that we don't incorrectly
   	 * increment the keepalives counter for each call, we
  -	 * use notes to store a state flag.
  +	 * assume that only here do we set keepalive. So if keepalive
  +	 * is already set to 1, we must have already been here and
  +	 * we should not increment the keepalives counter since we
  +	 * already done so for this request.
   	 */
  -	if (!herebefore) {
  +        if (r->connection->keepalive != 1) {
  +            r->connection->keepalive = 1;
               r->connection->keepalives++;
  -            ap_table_setn(r->notes, "ap_set_keepalive-called", "1");
   	}
   
           /* If they sent a Keep-Alive token, send one back */
  
  
  

Mime
View raw message