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-2.0/src/modules/standard mod_log_config.c
Date Fri, 03 Nov 2000 01:31:39 GMT
stoddard    00/11/02 17:31:38

  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.
  
  Revision  Changes    Path
  1.303     +8 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.302
  retrieving revision 1.303
  diff -u -r1.302 -r1.303
  --- CHANGES	2000/11/02 15:23:14	1.302
  +++ CHANGES	2000/11/03 01:31:34	1.303
  @@ -1,4 +1,12 @@
   Changes with Apache 2.0a8
  +
  +  *) 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]
  +
     *) Expand APR for WinNT to fully accept and return utf-8 encoded
        Unicode file names and paths, and tag the Content-Type from 
        mod_autoindex to reflect that charset if the APR_HAS_UNICODE_FS
  
  
  
  1.37      +18 -0     apache-2.0/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- mod_log_config.c	2000/10/18 18:10:00	1.36
  +++ mod_log_config.c	2000/11/03 01:31:37	1.37
  @@ -119,6 +119,10 @@
    * follows:
    *
    * %...b:  bytes sent, excluding HTTP headers.
  + * %...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
  @@ -463,7 +467,18 @@
   {
       return apr_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
  @@ -534,6 +549,9 @@
       },
       {
           'P', log_child_pid, 0
  +    },
  +    {
  +        'c', log_connection_status, 0
       },
       {
           '\0'
  
  
  

Mime
View raw message