Commit 6bb4e312 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Fix an irritating bug.  The forensic-id is captured in two places, as
  an r->notes entry, and in the (supposedly constant) server config(!)

  This patch retrieves the r->notes copy instead at final logging phase.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@169534 13f79535-47bb-0310-9956-ffa450edef68
parent 8754c1f1
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -227,18 +227,18 @@ static int log_after(request_rec *r)
{
    fcfg *cfg = ap_get_module_config(r->server->module_config,
                                     &log_forensic_module);
    const char *id;
    char *s;
    rcfg *rcfg;

    if(cfg->fd < 0)
        return DECLINED;

    rcfg = ap_get_module_config(r->request_config, &log_forensic_module);
    id = ap_table_get(r->notes, "forensic-id");

    if (!rcfg)
    if (!id)
        return DECLINED;

    s = ap_pstrcat(r->pool, "-", rcfg->id, "\n", NULL);
    s = ap_pstrcat(r->pool, "-", id, "\n", NULL);
    write(cfg->fd, s, strlen(s));

    return OK;