]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix an irritating bug. The forensic-id is captured in two places, as
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 10 May 2005 23:32:38 +0000 (23:32 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 10 May 2005 23:32:38 +0000 (23:32 +0000)
  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

src/modules/standard/mod_log_forensic.c

index 14b9ff193c8927331ef4bf29d42c44cfe9b2befa..6d27e3470ea84fc7de52b127195288739a7eabcc 100644 (file)
@@ -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;