You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/11/14 03:42:52 UTC

cvs commit: apache-2.0/src/main http_log.c

rbb         00/11/13 18:42:52

  Modified:    .        STATUS
               src      CHANGES
               src/main http_log.c
  Log:
  Add the referer to the error log if one is available.
  PR:	73
  Submitted by:	Markus Gyger <mg...@itr.ch>
  
  Revision  Changes    Path
  1.157     +1 -5      apache-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apache-2.0/STATUS,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -r1.156 -r1.157
  --- STATUS	2000/11/10 18:16:51	1.156
  +++ STATUS	2000/11/14 02:42:51	1.157
  @@ -1,5 +1,5 @@
   Apache 2.0 STATUS:
  -Last modified at [$Date: 2000/11/10 18:16:51 $]
  +Last modified at [$Date: 2000/11/14 02:42:51 $]
   
   Release:
   
  @@ -174,10 +174,6 @@
   
   PRs that have been suspended forever waiting for someone to
   put them into 'the next release':
  -
  -    * PR#73: mod_log-any
  -      reporting of referer in error_log
  -	Status: 
   
       * PR#76: general
         missing call to "setlocale();"
  
  
  
  1.325     +3 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.324
  retrieving revision 1.325
  diff -u -r1.324 -r1.325
  --- CHANGES	2000/11/14 01:55:26	1.324
  +++ CHANGES	2000/11/14 02:42:51	1.325
  @@ -1,4 +1,7 @@
   Changes with Apache 2.0a8
  +  *) Add the referer to the error log if one is available.
  +     [Markus Gyger <mg...@itr.ch>]
  +
     *) Mod_info.c has now been ported to Apache 2.0.  As a part of this
        change, the root of the configuration tree has been exposed to modules
        as ap_conftree.
  
  
  
  1.73      +6 -1      apache-2.0/src/main/http_log.c
  
  Index: http_log.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- http_log.c	2000/10/19 00:04:55	1.72
  +++ http_log.c	2000/11/14 02:42:51	1.73
  @@ -328,6 +328,7 @@
       char errstr[MAX_STRING_LEN];
       size_t len;
       apr_file_t *logf = NULL;
  +    const char *referer;
   
       if (s == NULL) {
   	/*
  @@ -425,8 +426,12 @@
   	len += apr_snprintf(errstr + len, MAX_STRING_LEN - len,
   		"(%d)%s: ", status, apr_strerror(status, buf, sizeof(buf)));
       }
  -
       len += apr_vsnprintf(errstr + len, MAX_STRING_LEN - len, fmt, args);
  +
  +    if (r && (referer = apr_table_get(r->headers_in, "Referer"))) {
  +        len += apr_snprintf(errstr + len, MAX_STRING_LEN - len,
  +                ", referer: %s", referer);
  +    }
   
       /* NULL if we are logging to syslog */
       if (logf) {