View | Details | Raw Unified | Return to bug 47591
Collapse All | Expand All

(-)server/scoreboard.c (-1 / +8 lines)
Lines 39-44 Link Here
39
AP_DECLARE_DATA scoreboard *ap_scoreboard_image = NULL;
39
AP_DECLARE_DATA scoreboard *ap_scoreboard_image = NULL;
40
AP_DECLARE_DATA const char *ap_scoreboard_fname = NULL;
40
AP_DECLARE_DATA const char *ap_scoreboard_fname = NULL;
41
AP_DECLARE_DATA int ap_extended_status = 0;
41
AP_DECLARE_DATA int ap_extended_status = 0;
42
AP_DECLARE_DATA int ap_scoreboard_display_hostname = 0;
42
AP_DECLARE_DATA int ap_mod_status_reqtail = 0;
43
AP_DECLARE_DATA int ap_mod_status_reqtail = 0;
43
44
44
#if APR_HAS_SHARED_MEMORY
45
#if APR_HAS_SHARED_MEMORY
Lines 472-479 Link Here
472
            apr_cpystrn(ws->client, ap_get_remote_host(c, r->per_dir_config,
473
            apr_cpystrn(ws->client, ap_get_remote_host(c, r->per_dir_config,
473
                        REMOTE_NOLOOKUP, NULL), sizeof(ws->client));
474
                        REMOTE_NOLOOKUP, NULL), sizeof(ws->client));
474
            copy_request(ws->request, sizeof(ws->request), r);
475
            copy_request(ws->request, sizeof(ws->request), r);
475
            apr_cpystrn(ws->vhost, r->server->server_hostname,
476
            if (ap_scoreboard_display_hostname == 0) {
477
                apr_cpystrn(ws->vhost, r->server->server_hostname,
476
                        sizeof(ws->vhost));
478
                        sizeof(ws->vhost));
479
            }
480
            else {
481
                apr_cpystrn(ws->vhost, r->hostname == NULL ? r->server->server_hostname : r->hostname,
482
                        sizeof(ws->vhost));
483
            }
477
        }
484
        }
478
    }
485
    }
479
486
(-)modules/generators/mod_status.c (+12 lines)
Lines 116-121 Link Here
116
    return NULL;
116
    return NULL;
117
}
117
}
118
118
119
static const char *set_scoreboard_display_hostname(cmd_parms *cmd, void *dummy, int arg)
120
{
121
    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
122
    if (err != NULL) {
123
        return err;
124
    }
125
    ap_scoreboard_display_hostname = arg;
126
    return NULL;
127
}
128
119
static const char *set_reqtail(cmd_parms *cmd, void *dummy, int arg)
129
static const char *set_reqtail(cmd_parms *cmd, void *dummy, int arg)
120
{
130
{
121
    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
131
    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
Lines 131-136 Link Here
131
{
141
{
132
    AP_INIT_FLAG("ExtendedStatus", set_extended_status, NULL, RSRC_CONF,
142
    AP_INIT_FLAG("ExtendedStatus", set_extended_status, NULL, RSRC_CONF,
133
      "\"On\" to enable extended status information, \"Off\" to disable"),
143
      "\"On\" to enable extended status information, \"Off\" to disable"),
144
    AP_INIT_FLAG("ScoreBoardDisplayHostname", set_scoreboard_display_hostname, NULL, RSRC_CONF,
145
      "\"On\" to enable displaying the Hostname that was requested instead of ServerName in the scoreboards VHost field, \"Off\" to disable"),
134
    AP_INIT_FLAG("SeeRequestTail", set_reqtail, NULL, RSRC_CONF,
146
    AP_INIT_FLAG("SeeRequestTail", set_reqtail, NULL, RSRC_CONF,
135
      "For verbose requests, \"On\" to see the last 63 chars of the request, "
147
      "For verbose requests, \"On\" to see the last 63 chars of the request, "
136
      "\"Off\" (default) to see the first 63 in extended status display"),
148
      "\"Off\" (default) to see the first 63 in extended status display"),
(-)include/scoreboard.h (+1 lines)
Lines 185-190 Link Here
185
AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image;
185
AP_DECLARE_DATA extern scoreboard *ap_scoreboard_image;
186
AP_DECLARE_DATA extern const char *ap_scoreboard_fname;
186
AP_DECLARE_DATA extern const char *ap_scoreboard_fname;
187
AP_DECLARE_DATA extern int ap_extended_status;
187
AP_DECLARE_DATA extern int ap_extended_status;
188
AP_DECLARE_DATA extern int ap_scoreboard_display_hostname;
188
AP_DECLARE_DATA extern int ap_mod_status_reqtail;
189
AP_DECLARE_DATA extern int ap_mod_status_reqtail;
189
190
190
AP_DECLARE_DATA extern ap_generation_t volatile ap_my_generation;
191
AP_DECLARE_DATA extern ap_generation_t volatile ap_my_generation;

Return to bug 47591