httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject r->status = new->status;
Date Tue, 10 Dec 1996 22:45:17 GMT

I didn't get any response on this last time, so here goes again..

A last minute 1.1 -> 1.2b1 patch from Ben (which I +1'ed) needs to be
removed.

The reason for having it was to get internally redirected requests
logged with the final status value instead of the original one (e.g.
after ErrorDocument has come to the rescue and sent out a 200 OK).

The last minute change breaks mod_log_config.c, which if you check,
has options to log the final status anyway. So this "fix" is redundant
and it hardcodes Apache's behaviour and prevents reconfiguration.

If it is important that Apache logs the same status as the client sees
(which is reasonable considering the complexity^H^H^H^H^Hsophistication
of Apache configs these days - lots of internal redirects doing lots of
tricks), then all that's needed is to adjust the default log format string.

This is a new bug IMO.  Vote for the patches spearately if necessary.


Index: http_request.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_request.c,v
retrieving revision 1.1
diff -c -r1.1 http_request.c
*** http_request.c      1996/12/10 05:02:47     1.1
--- http_request.c      1996/12/10 22:28:26
***************
*** 1008,1018 ****
  {
      request_rec *new = internal_internal_redirect(new_uri, r);
      process_request_internal (new);
- 
-     /* Promote the new redirected request result into r for logging.
-      * We may need to promote other things, but this one is known.
-      */
-     r->status = new->status;
  }
  
  /* This function is designed for things like actions or CGI scripts, when
--- 1008,1013 ----




Index: mod_log_config.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_log_config.c,v
retrieving revision 1.1
diff -c -r1.1 mod_log_config.c
*** mod_log_config.c    1996/12/10 05:03:12     1.1
--- mod_log_config.c    1996/12/10 22:34:53
***************
*** 155,161 ****
   *
   * --- rst */
  
! #define DEFAULT_LOG_FORMAT "%h %l %u %t \"%r\" %s %b"
  
  #include "httpd.h"
  #include "http_config.h"
--- 155,161 ----
   *
   * --- rst */
  
! #define DEFAULT_LOG_FORMAT "%h %l %u %t \"%r\" %>s %b"
  
  #include "httpd.h"
  #include "http_config.h"


Mime
View raw message