httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alois Treindl <>
Subject Re: [users@httpd] apache 2.0 accesslog timestamp differs from apache 1.3
Date Sun, 20 Jun 2004 11:34:34 GMT
Nick Kew wrote:

> Developers sometimes make changes requested by users: I've written more
> than one new module in response to - for example - a passing request
> (or a "why can't it do?" question) on #apache[1], or a need identified
> in a Usenet thread[2].  But I doubt your attitude above has made you many
> friends.


I have learned how to create and apply a patch, and made a patched for my purpose.

In the process, I discovered an actual bug in mod_log_config.c

The code is:
static const char *log_request_time(request_rec *r, char *a)
         apr_time_t request_time = apr_time_now();
         apr_time_t request_time = r->request_time;
         unsigned t_seconds = (unsigned)apr_time_sec(request_time);
         unsigned i = t_seconds & TIME_CACHE_MASK;
         memcpy(cached_time, &(request_time_cache[i]), 
         if ((t_seconds != cached_time->t) ||
             (t_seconds != cached_time->t_validate)) {

             /* Invalid or old snapshot, so compute the proper time string
              * and store it in the cache
             char sign;
             int timz;

             ap_explode_recent_localtime(&xt, r->request_time);

The last line is wrong: it uses r->request_time instead of the local
variable request_time.

It should be
ap_explode_recent_localtime(&xt, request_time);

I have submitted the bug to apache bugzilla.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message