Skip to content

Commit

Permalink
mod_status should honor remote_ip as documented
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1624349 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jimjag committed Sep 11, 2014
1 parent 1406f16 commit 4587109
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/scoreboard.c
Expand Up @@ -484,8 +484,14 @@ static int update_child_status_internal(int child_num,
ws->last_used = apr_time_now();
}
if (r) {
apr_cpystrn(ws->client, ap_get_remote_host(c, r->per_dir_config,
REMOTE_NOLOOKUP, NULL), sizeof(ws->client));
const char *client = ap_get_remote_host(c, r->per_dir_config,
REMOTE_NOLOOKUP, NULL);
if (!client || !strcmp(client, c->client_ip)) {
apr_cpystrn(ws->client, r->useragent_ip, sizeof(ws->client));
}
else {
apr_cpystrn(ws->client, client, sizeof(ws->client));
}
copy_request(ws->request, sizeof(ws->request), r);
if (r->server) {
apr_snprintf(ws->vhost, sizeof(ws->vhost), "%s:%d",
Expand Down

0 comments on commit 4587109

Please sign in to comment.