www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Fieber <jfie...@indiana.edu>
Subject mod_log-any/1320: %t indicates when the request finished, not started.
Date Sat, 25 Oct 1997 01:50:12 GMT

>Number:         1320
>Category:       mod_log-any
>Synopsis:       %t indicates when the request finished, not started.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Oct 24 19:00:01 PDT 1997
>Originator:     jfieber@indiana.edu
>Release:        1.2.4
FreeBSD 2.2.2 (but not relevant for this problem)
The %t directive for the custom log format reports when the request
is finished rather than when it started.  Whether or not this is
as bug is certainly debatable, but for a project I'm working on, recording
the start of the transaction is important.  (Specifically, I have
apache set up as a proxy to monitor traffic at the client end of a
surfish session, as part of some web site usability testing.)

I've included a patch to mod_log_custom.c that provides the behavior
I need.

*** src/mod_log_config.c.orig   Fri Oct 24 20:25:45 1997
--- src/mod_log_config.c        Fri Oct 24 20:25:55 1997
*** 302,307 ****
--- 302,311 ----
      t = get_gmtoff(&timz);
+     /* The above reports the time the request finishes, not when
+        it starts.  Adjust t here for the start time. */
+     t = localtime(&(r->request_time));
      if (a && *a) /* Custom format */
        strftime(tstr, MAX_STRING_LEN, a, t);
      else { /* CLF format */

View raw message