]> granicus.if.org Git - apache/commitdiff
Removed the keptalive boolean from conn_rec because it is now only
authorRoy T. Fielding <fielding@apache.org>
Thu, 26 Apr 2001 00:33:14 +0000 (00:33 +0000)
committerRoy T. Fielding <fielding@apache.org>
Thu, 26 Apr 2001 00:33:14 +0000 (00:33 +0000)
used by a single routine and can be replaced by a local variable.

Submitted by: Greg Stein, Ryan Bloom, Roy Fielding

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88938 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
include/httpd.h
server/protocol.c

diff --git a/CHANGES b/CHANGES
index 39b633cef1ce5bca7aa09805b5ea4c13bcfe1d85..baee74e04edf301a6153b3e724d4a18ccebc1710 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 Changes with Apache 2.0.18-dev
 
+  *) Removed the keptalive boolean from conn_rec because it is now only
+     used by a single routine and can be replaced by a local variable.
+     [Greg Stein, Ryan Bloom, Roy Fielding]
+
   *) Patch prefork to put enough of the signal processing back in so that
      signals are all handled properly now. The previous patch fixed the
      deadlock race condition, but broke the user directed signal handling.
index 27423fc17acb25797b99adc8cb2ab93582d004be..ca3fe2043b9d7845a4d7b4e1f4d017bb084f4241 100644 (file)
@@ -858,10 +858,11 @@ struct conn_rec {
 
     /** Are we still talking? */
     unsigned aborted:1;
-    /** Are we using HTTP Keep-Alive?  -1 fatal error, 0 undecided, 1 yes */
+
+    /** Are we going to keep the connection alive for another request?
+     *  -1 fatal error, 0 undecided, 1 yes   */
     signed int keepalive:2;
-    /** Did we use HTTP Keep-Alive? */
-    unsigned keptalive:1;
+
     /** have we done double-reverse DNS? -1 yes/failure, 0 not yet, 
      *  1 yes/success */
     signed int double_reverse:2;
index 8b14fb7d31053682afa7ae5d118fa429f40fbfb8..93db7c32d016de8fb3f20489b83ddf94529492d5 100644 (file)
@@ -547,7 +547,7 @@ request_rec *ap_read_request(conn_rec *conn)
     request_rec *r;
     apr_pool_t *p;
     const char *expect;
-    int access_status;
+    int access_status, keptalive;
 
     apr_pool_create(&p, conn->pool);
     r = apr_pcalloc(p, sizeof(request_rec));
@@ -555,7 +555,7 @@ request_rec *ap_read_request(conn_rec *conn)
     r->connection      = conn;
     r->server          = conn->base_server;
 
-    conn->keptalive    = conn->keepalive == 1;
+    keptalive          = conn->keepalive == 1;
     conn->keepalive    = 0;
 
     r->user            = NULL;
@@ -584,7 +584,7 @@ request_rec *ap_read_request(conn_rec *conn)
     r->input_filters   = conn->input_filters;
 
     apr_setsocketopt(conn->client_socket, APR_SO_TIMEOUT, 
-                     (int)(conn->keptalive
+                     (int)(keptalive
                      ? r->server->keep_alive_timeout * APR_USEC_PER_SEC
                      : r->server->timeout * APR_USEC_PER_SEC));
                      
@@ -603,7 +603,7 @@ request_rec *ap_read_request(conn_rec *conn)
         }
         return NULL;
     }
-    if (r->connection->keptalive) {
+    if (keptalive) {
         apr_setsocketopt(r->connection->client_socket, APR_SO_TIMEOUT,
                          (int)(r->server->timeout * APR_USEC_PER_SEC));
     }
@@ -645,8 +645,6 @@ request_rec *ap_read_request(conn_rec *conn)
     /* we may have switched to another server */
     r->per_dir_config = r->server->lookup_defaults;
 
-    conn->keptalive = 0;        /* We now have a request to play with */
-
     if ((!r->hostname && (r->proto_num >= HTTP_VERSION(1,1))) ||
         ((r->proto_num == HTTP_VERSION(1,1)) &&
          !apr_table_get(r->headers_in, "Host"))) {