You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/01/06 02:08:28 UTC

mod_log_config: odd values for %T (fwd)

Anyone want to review/commit this?

Dean

---------- Forwarded message ----------
Date: Sun, 29 Dec 1996 14:24:49 -0800 (PST)
From: Dean Gaudet <dg...@hotwired.com>
Reply-To: new-httpd@hyperreal.com
To: new-httpd@apache.org
Subject: mod_log_config: odd values for %T (fwd)

Two problems.  The first is that every call to make_sub_request wasn't
copying the original request's request_time.  The second was that
mod_log_config was defaulting to "do not want_orig" for %T (i.e. %>T was
default not %<T).  Try the following patch or use %<T.

I considered copying the time right inside make_sub_request.  I also
considered making make_sub_request a static function.  Both may be the
right thing to do...   In hotwired's code I keep track of time statistics
and other stuff that is "global" to a particular request in the conn_rec
structure.  Mostly because I am lazy.  But it does avoid this problem
where you have to copy the values from request to sub request.

I'm willing to make up a different patch that takes one of those approaches...

Dean

*** http_request.c.dist	Sun Dec 29 14:09:12 1996
--- http_request.c	Sun Dec 29 14:09:57 1996
***************
*** 568,573 ****
--- 568,574 ----
      char *udir;
      
      rnew = make_sub_request (r);
+     rnew->request_time = r->request_time;
      rnew->connection = r->connection; 
      rnew->server = r->server;
      rnew->request_config = create_request_config (rnew->pool);
***************
*** 651,657 ****
  
      rnew = make_sub_request (r);
      fdir = make_dirstr (rnew->pool, r->filename, count_dirs (r->filename));
!     
      rnew->connection = r->connection; /* For now... */
      rnew->server = r->server;
      rnew->request_config = create_request_config (rnew->pool);
--- 652,659 ----
  
      rnew = make_sub_request (r);
      fdir = make_dirstr (rnew->pool, r->filename, count_dirs (r->filename));
! 
!     rnew->request_time = r->request_time;
      rnew->connection = r->connection; /* For now... */
      rnew->server = r->server;
      rnew->request_config = create_request_config (rnew->pool);
*** mod_log_config.c.dist	Sun Dec 29 14:17:05 1996
--- mod_log_config.c	Sun Dec 29 14:17:21 1996
***************
*** 345,351 ****
      { 'l', log_remote_logname, 0 },
      { 'u', log_remote_user, 0 },
      { 't', log_request_time, 0 },
!     { 'T', log_request_duration, 0 },
      { 'r', log_request_line, 1 },
      { 'f', log_request_file, 0 },
      { 'U', log_request_uri, 1 },
--- 345,351 ----
      { 'l', log_remote_logname, 0 },
      { 'u', log_remote_user, 0 },
      { 't', log_request_time, 0 },
!     { 'T', log_request_duration, 1 },
      { 'r', log_request_line, 1 },
      { 'f', log_request_file, 0 },
      { 'U', log_request_uri, 1 },