ASF Bugzilla – Attachment 24045 Details for
Bug 47591
show current HTTP_HOST in mod_status scoreboard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 2.2.x
httpd-2.2.x_scoreboard_patch.diff (text/plain), 3.00 KB, created by
Brendan Beveridge
on 2009-07-27 15:46:49 UTC
(
hide
)
Description:
Patch for 2.2.x
Filename:
MIME Type:
Creator:
Brendan Beveridge
Created:
2009-07-27 15:46:49 UTC
Size:
3.00 KB
patch
obsolete
>Index: server/scoreboard.c >=================================================================== >--- server/scoreboard.c (revision 798305) >+++ server/scoreboard.c (working copy) >@@ -40,6 +40,7 @@ > AP_DECLARE_DATA scoreboard *ap_scoreboard_image = NULL; > AP_DECLARE_DATA const char *ap_scoreboard_fname = NULL; > AP_DECLARE_DATA int ap_extended_status = 0; >+AP_DECLARE_DATA int ap_scoreboard_display_hostname = 0; > AP_DECLARE_DATA int ap_mod_status_reqtail = 0; > > #if APR_HAS_SHARED_MEMORY >@@ -462,8 +463,14 @@ > apr_cpystrn(ws->client, ap_get_remote_host(c, r->per_dir_config, > REMOTE_NOLOOKUP, NULL), sizeof(ws->client)); > copy_request(ws->request, sizeof(ws->request), r); >- apr_cpystrn(ws->vhost, r->server->server_hostname, >- sizeof(ws->vhost)); >+ if (ap_scoreboard_display_hostname == 0) { >+ apr_cpystrn(ws->vhost, r->server->server_hostname, >+ sizeof(ws->vhost)); >+ } >+ else { >+ apr_cpystrn(ws->vhost, r->hostname == NULL ? r->server->server_hostname : r->hostname, >+ sizeof(ws->vhost)); >+ } > } > } > >Index: modules/generators/mod_status.c >=================================================================== >--- modules/generators/mod_status.c (revision 798305) >+++ modules/generators/mod_status.c (working copy) >@@ -129,6 +129,16 @@ > return NULL; > } > >+static const char *set_scoreboard_display_hostname(cmd_parms *cmd, void *dummy, int arg) >+{ >+ const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); >+ if (err != NULL) { >+ return err; >+ } >+ ap_scoreboard_display_hostname = arg; >+ return NULL; >+} >+ > static const char *set_reqtail(cmd_parms *cmd, void *dummy, int arg) > { > const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); >@@ -144,6 +154,8 @@ > { > AP_INIT_FLAG("ExtendedStatus", set_extended_status, NULL, RSRC_CONF, > "\"On\" to enable extended status information, \"Off\" to disable"), >+ AP_INIT_FLAG("ScoreBoardDisplayHostname", set_scoreboard_display_hostname, NULL, RSRC_CONF, >+ "\"On\" to enable displaying the Hostname that was requested instead of ServerName in the scoreboards VHost field, \"Off\" to disable"), > AP_INIT_FLAG("SeeRequestTail", set_reqtail, NULL, RSRC_CONF, > "For verbose requests, \"On\" to see the last 63 chars of the request, " > "\"Off\" (default) to see the first 63 in extended status display"), >Index: include/scoreboard.h >=================================================================== >--- include/scoreboard.h (revision 798305) >+++ include/scoreboard.h (working copy) >@@ -197,6 +197,7 @@ > AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image; > AP_DECLARE_DATA extern const char *ap_scoreboard_fname; > AP_DECLARE_DATA extern int ap_extended_status; >+AP_DECLARE_DATA extern int ap_scoreboard_display_hostname; > AP_DECLARE_DATA extern int ap_mod_status_reqtail; > > AP_DECLARE_DATA extern ap_generation_t volatile ap_my_generation;
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 47591
:
24044
| 24045