]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Use the new ap_update_child_status_from_conn() to put the client IP into the
authorStefan Fritsch <sf@apache.org>
Sun, 18 Oct 2009 21:38:35 +0000 (21:38 +0000)
committerStefan Fritsch <sf@apache.org>
Sun, 18 Oct 2009 21:38:35 +0000 (21:38 +0000)
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

modules/http/http_core.c
server/scoreboard.c

index 5a3c7055e992939f30fd2c650773320b67ebae6a..ae97d314c530e4e3ce7bf9c38fe7ce948c448e74 100644 (file)
@@ -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;
index 0831b6351c7bf480c7a71730450fe70709dd2152..4ecaf05c21087972e7e36fc96677a896c1b69c5e 100644 (file)
@@ -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';
         }
     }