Loading modules/http/http_protocol.c +12 −2 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ static int is_mpm_running(void) AP_DECLARE(int) ap_set_keepalive(request_rec *r) { int ka_sent = 0; int left = r->server->keep_alive_max - r->connection->keepalives; int wimpy = ap_find_token(r->pool, apr_table_get(r->headers_out, "Connection"), "close"); Loading Loading @@ -221,7 +222,7 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r) && r->server->keep_alive && (r->server->keep_alive_timeout > 0) && ((r->server->keep_alive_max == 0) || (r->server->keep_alive_max > r->connection->keepalives)) || (left > 0)) && !ap_status_drops_connection(r->status) && !wimpy && !ap_find_token(r->pool, conn, "close") Loading @@ -230,7 +231,6 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r) && ((ka_sent = ap_find_token(r->pool, conn, "keep-alive")) || (r->proto_num >= HTTP_VERSION(1,1))) && is_mpm_running()) { int left = r->server->keep_alive_max - r->connection->keepalives; r->connection->keepalive = AP_CONN_KEEPALIVE; r->connection->keepalives++; Loading Loading @@ -266,6 +266,16 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r) apr_table_mergen(r->headers_out, "Connection", "close"); } /* * If we had previously been a keepalive connection and this * is the last one, then bump up the number of keepalives * we've had */ if ((r->connection->keepalive != AP_CONN_CLOSE) && r->server->keep_alive_max && !left) { r->connection->keepalives++; } r->connection->keepalive = AP_CONN_CLOSE; return 0; Loading modules/loggers/mod_log_config.c +2 −1 Original line number Diff line number Diff line Loading @@ -697,7 +697,8 @@ static const char *log_connection_status(request_rec *r, char *a) static const char *log_requests_on_connection(request_rec *r, char *a) { return apr_itoa(r->pool, r->connection->keepalives); int num = r->connection->keepalives ? r->connection->keepalives - 1 : 0; return apr_itoa(r->pool, num); } /***************************************************************** Loading Loading
modules/http/http_protocol.c +12 −2 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ static int is_mpm_running(void) AP_DECLARE(int) ap_set_keepalive(request_rec *r) { int ka_sent = 0; int left = r->server->keep_alive_max - r->connection->keepalives; int wimpy = ap_find_token(r->pool, apr_table_get(r->headers_out, "Connection"), "close"); Loading Loading @@ -221,7 +222,7 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r) && r->server->keep_alive && (r->server->keep_alive_timeout > 0) && ((r->server->keep_alive_max == 0) || (r->server->keep_alive_max > r->connection->keepalives)) || (left > 0)) && !ap_status_drops_connection(r->status) && !wimpy && !ap_find_token(r->pool, conn, "close") Loading @@ -230,7 +231,6 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r) && ((ka_sent = ap_find_token(r->pool, conn, "keep-alive")) || (r->proto_num >= HTTP_VERSION(1,1))) && is_mpm_running()) { int left = r->server->keep_alive_max - r->connection->keepalives; r->connection->keepalive = AP_CONN_KEEPALIVE; r->connection->keepalives++; Loading Loading @@ -266,6 +266,16 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r) apr_table_mergen(r->headers_out, "Connection", "close"); } /* * If we had previously been a keepalive connection and this * is the last one, then bump up the number of keepalives * we've had */ if ((r->connection->keepalive != AP_CONN_CLOSE) && r->server->keep_alive_max && !left) { r->connection->keepalives++; } r->connection->keepalive = AP_CONN_CLOSE; return 0; Loading
modules/loggers/mod_log_config.c +2 −1 Original line number Diff line number Diff line Loading @@ -697,7 +697,8 @@ static const char *log_connection_status(request_rec *r, char *a) static const char *log_requests_on_connection(request_rec *r, char *a) { return apr_itoa(r->pool, r->connection->keepalives); int num = r->connection->keepalives ? r->connection->keepalives - 1 : 0; return apr_itoa(r->pool, num); } /***************************************************************** Loading