Index: include/httpd.h =================================================================== --- include/httpd.h (revision 1742803) +++ include/httpd.h (working copy) @@ -1095,6 +1095,9 @@ typedef enum { AP_CONN_KEEPALIVE } ap_conn_keepalive_e; +/* AP_SB_*_SIZE needed by conn_rec */ +#include "scoreboard.h" + /** * @brief Structure to store things which are per connection */ @@ -1217,6 +1220,10 @@ struct conn_rec { /** The minimum level of filter type to allow setaside buckets */ int async_filter; + + /** Preserve scoreboard's worker last request infos */ + char sb_lastrline[AP_SB_RLINE_SIZE]; + char sb_lastvhost[AP_SB_VHOST_SIZE]; }; struct conn_slave_rec { Index: include/scoreboard.h =================================================================== --- include/scoreboard.h (revision 1742803) +++ include/scoreboard.h (working copy) @@ -85,6 +85,9 @@ typedef enum { SB_SHARED = 2 } ap_scoreboard_e; +#define AP_SB_RLINE_SIZE 64 +#define AP_SB_VHOST_SIZE 32 + /* stuff which is worker specific */ typedef struct worker_score worker_score; struct worker_score { @@ -113,8 +116,8 @@ struct worker_score { struct tms times; #endif char client[40]; /* Keep 'em small... but large enough to hold an IPv6 address */ - char request[64]; /* We just want an idea... */ - char vhost[32]; /* What virtual host is being accessed? */ + char request[AP_SB_RLINE_SIZE]; /* We just want an idea... */ + char vhost[AP_SB_VHOST_SIZE]; /* What virtual host is being accessed? */ char protocol[16]; /* What protocol is used on the connection? */ }; Index: server/connection.c =================================================================== --- server/connection.c (revision 1742803) +++ server/connection.c (working copy) @@ -101,7 +101,7 @@ AP_DECLARE(int) ap_prep_lingering_close(conn_rec * ap_run_pre_close_connection(c); if (c->sbh) { - ap_update_child_status(c->sbh, SERVER_CLOSING, NULL); + ap_update_child_status_from_conn(c->sbh, SERVER_CLOSING, c); } return 0; } Index: server/scoreboard.c =================================================================== --- server/scoreboard.c (revision 1742803) +++ server/scoreboard.c (working copy) @@ -499,9 +499,10 @@ static int update_child_status_internal(int child_ } else if (r) { copy_request(ws->request, sizeof(ws->request), r); + apr_cpystrn(c->sb_lastrline, ws->request, sizeof(c->sb_lastrline)); } else if (c) { - ws->request[0]='\0'; + apr_cpystrn(ws->request, c->sb_lastrline, sizeof(ws->request)); } if (r && r->useragent_ip) { @@ -522,6 +523,8 @@ static int update_child_status_internal(int child_ if (c) { apr_snprintf(ws->vhost, sizeof(ws->vhost), "%s:%d", s->server_hostname, c->local_addr->port); + apr_cpystrn(c->sb_lastvhost, ws->vhost, + sizeof(c->sb_lastvhost)); } else { apr_cpystrn(ws->vhost, s->server_hostname, sizeof(ws->vhost)); @@ -528,7 +531,7 @@ static int update_child_status_internal(int child_ } } else if (c) { - ws->vhost[0]='\0'; + apr_cpystrn(ws->vhost, c->sb_lastvhost, sizeof(ws->vhost)); } if (c) {