From: Stefan Fritsch Date: Sun, 18 Oct 2009 21:38:35 +0000 (+0000) Subject: Use the new ap_update_child_status_from_conn() to put the client IP into the X-Git-Tag: 2.3.3~150 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=702b9ec34de714b20df972abb4b4606a031cebf2;p=thirdparty%2Fapache%2Fhttpd.git Use the new ap_update_child_status_from_conn() to put the client IP into the scoreboard (and show it in mod_status) as soon as we start reading the request. Empty the vhost and request fields in ap_update_child_status_from_conn so that mod_status does not display outdated data if the connection closes without the request being completely read. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@826530 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 5a3c7055e99..ae97d314c53 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -135,7 +135,7 @@ static int ap_process_http_async_connection(conn_rec *c) AP_DEBUG_ASSERT(cs->state == CONN_STATE_READ_REQUEST_LINE); while (cs->state == CONN_STATE_READ_REQUEST_LINE) { - ap_update_child_status(c->sbh, SERVER_BUSY_READ, NULL); + ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_READ, c); if ((r = ap_read_request(c))) { @@ -182,7 +182,7 @@ static int ap_process_http_sync_connection(conn_rec *c) * until no requests are left or we decide to close. */ - ap_update_child_status(c->sbh, SERVER_BUSY_READ, NULL); + ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_READ, c); while ((r = ap_read_request(c)) != NULL) { c->keepalive = AP_CONN_UNKNOWN; diff --git a/server/scoreboard.c b/server/scoreboard.c index 0831b6351c7..4ecaf05c210 100644 --- a/server/scoreboard.c +++ b/server/scoreboard.c @@ -490,6 +490,8 @@ static int update_child_status_internal(int child_num, else if (c) { apr_cpystrn(ws->client, ap_get_remote_host(c, NULL, REMOTE_NOLOOKUP, NULL), sizeof(ws->client)); + ws->request[0]='\0'; + ws->vhost[0]='\0'; } }