ASF Bugzilla – Attachment 33803 Details for
Bug 59333
Version 2.4.20 server-status does not show page being retrieved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Save/restore last request info in/from conn_rec
save_worker_score_conn_info.patch (text/plain), 2.96 KB, created by
Yann Ylavic
on 2016-04-25 21:37:46 UTC
(
hide
)
Description:
Save/restore last request info in/from conn_rec
Filename:
MIME Type:
Creator:
Yann Ylavic
Created:
2016-04-25 21:37:46 UTC
Size:
2.96 KB
patch
obsolete
>Index: include/httpd.h >=================================================================== >--- include/httpd.h (revision 1740388) >+++ 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_lastreq[AP_SB_REQ_SIZE]; >+ char sb_lastvhost[AP_SB_VHOST_SIZE]; > }; > > struct conn_slave_rec { >Index: include/scoreboard.h >=================================================================== >--- include/scoreboard.h (revision 1740388) >+++ include/scoreboard.h (working copy) >@@ -85,6 +85,9 @@ typedef enum { > SB_SHARED = 2 > } ap_scoreboard_e; > >+#define AP_SB_REQ_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_REQ_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/scoreboard.c >=================================================================== >--- server/scoreboard.c (revision 1740388) >+++ server/scoreboard.c (working copy) >@@ -500,6 +500,10 @@ static int update_child_status_internal(int child_ > else if (r) { > copy_request(ws->request, sizeof(ws->request), r); > } >+ else if (c && old_status == SERVER_READY) { >+ apr_cpystrn(ws->request, c->sb_lastreq, >+ sizeof(ws->request)); >+ } > > if (r) { > if (!(val = ap_get_useragent_host(r, REMOTE_NOLOOKUP, NULL))) >@@ -524,10 +528,21 @@ static int update_child_status_internal(int child_ > apr_cpystrn(ws->vhost, s->server_hostname, sizeof(ws->vhost)); > } > } >+ else if (c && old_status == SERVER_READY) { >+ apr_cpystrn(ws->vhost, c->sb_lastvhost, >+ sizeof(ws->vhost)); >+ } > > if (c) { > val = ap_get_protocol(c); > apr_cpystrn(ws->protocol, val, sizeof(ws->protocol)); >+ >+ if (status == SERVER_BUSY_LOG) { >+ apr_cpystrn(c->sb_lastreq, ws->request, >+ sizeof(c->sb_lastreq)); >+ apr_cpystrn(c->sb_lastvhost, ws->vhost, >+ sizeof(c->sb_lastreq)); >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 59333
:
33769
|
33801
|
33803
|
33808
|
33829
|
33830
|
33835
|
33836