httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@locus.apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_log_config.c
Date Thu, 02 Nov 2000 21:40:31 GMT
stoddard    00/11/02 13:40:31

  Modified:    src      CHANGES
               src/modules/standard mod_log_config.c
  Log:
  Add a new LogFormat directive, %c, that will log connection
  status at the end of the response as follows:
  'X' - connection aborted before the response completed.
  '+' - connection may be kept-alive by the server.
  '-' - connection will be closed by the server.
  
  Doc. update will be committed RSN...
  
  Revision  Changes    Path
  1.1591    +7 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1590
  retrieving revision 1.1591
  diff -u -r1.1590 -r1.1591
  --- CHANGES	2000/11/02 17:19:13	1.1590
  +++ CHANGES	2000/11/02 21:40:27	1.1591
  @@ -1,5 +1,12 @@
   Changes with Apache 1.3.15
   
  +  *) Add a new LogFormat directive, %c, that will log connection
  +     status at the end of the response as follows:
  +     'X' - connection aborted before the response completed.
  +     '+' - connection may be kept-alive by the server.
  +     '-' - connection will be closed by the server.
  +     [Bill Stoddard <stoddard@apache.org>]
  +     
     *) Normalize all NetWare config directive paths and filespecs to
        their canonical names.  [Brad Nicholes <bnicholes@novell.com>]
   
  
  
  
  1.83      +18 -0     apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- mod_log_config.c	2000/06/01 23:42:28	1.82
  +++ mod_log_config.c	2000/11/02 21:40:29	1.83
  @@ -120,6 +120,10 @@
    * %...B:  bytes sent, excluding HTTP headers.
    * %...b:  bytes sent, excluding HTTP headers in CLF format, i.e. a '-'
    *         when no bytes where sent (rather than a '0'.
  + * %...c:  Status of the connection.
  + *         'X' = connection aborted before the response completed.
  + *         '+' = connection may be kept alive after the response is sent.
  + *         '-' = connection will be closed after the response is sent.
    * %...{FOOBAR}e:  The contents of the environment variable FOOBAR
    * %...f:  filename
    * %...h:  remote host
  @@ -465,7 +469,18 @@
   {
       return ap_psprintf(r->pool, "%ld", (long) getpid());
   }
  +static const char *log_connection_status(request_rec *r, char *a)
  +{
  +    if (r->connection->aborted)
  +        return "X";
  +
  +    if ((r->connection->keepalive) &&
  +        ((r->server->keep_alive_max - r->connection->keepalives) > 0)) {
  +        return "+";
  +    }
   
  +    return "-";
  +}
   /*****************************************************************
    *
    * Parsing the log format string
  @@ -548,6 +563,9 @@
       },
       {
           'q', log_request_query, 0
  +    },
  +    {
  +        'c', log_connection_status, 0
       },
       {
           '\0'
  
  
  

Mime
View raw message