You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2009/10/18 23:38:36 UTC

svn commit: r826530 - in /httpd/httpd/trunk: modules/http/http_core.c server/scoreboard.c

Author: sf
Date: Sun Oct 18 21:38:35 2009
New Revision: 826530

URL: http://svn.apache.org/viewvc?rev=826530&view=rev
Log:
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.

Modified:
    httpd/httpd/trunk/modules/http/http_core.c
    httpd/httpd/trunk/server/scoreboard.c

Modified: httpd/httpd/trunk/modules/http/http_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_core.c?rev=826530&r1=826529&r2=826530&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_core.c (original)
+++ httpd/httpd/trunk/modules/http/http_core.c Sun Oct 18 21:38:35 2009
@@ -135,7 +135,7 @@
     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 @@
      * 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;

Modified: httpd/httpd/trunk/server/scoreboard.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/scoreboard.c?rev=826530&r1=826529&r2=826530&view=diff
==============================================================================
--- httpd/httpd/trunk/server/scoreboard.c (original)
+++ httpd/httpd/trunk/server/scoreboard.c Sun Oct 18 21:38:35 2009
@@ -490,6 +490,8 @@
         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';
         }
     }