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.
/** 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;
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));
r->connection = conn;
r->server = conn->base_server;
- conn->keptalive = conn->keepalive == 1;
+ keptalive = conn->keepalive == 1;
conn->keepalive = 0;
r->user = NULL;
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));
}
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));
}
/* 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"))) {