httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank J. Faubert, Jr." <fr...@sane.com>
Subject Re: [PATCH] Another note on logging changes
Date Wed, 19 Nov 1997 22:10:14 GMT
FYI:  You can have a | in a referrer:

file:///c|/test.html

-Frank

-----Original Message-----
From: Dean Gaudet <dgaudet@arctic.org>
To: new-httpd@apache.org <new-httpd@apache.org>
Date: Wednesday, November 19, 1997 4:46 PM
Subject: Re: [PATCH] Another note on logging changes


>+0
>
>I'm not going to veto this.  But it seems silly to just poke away at lame
>common log format legacy without going the whole distance.  For example,
>there is no way with mod_log_config to write a log in which all the fields
>are discernable from each other just by splitting on a field delimiter.
>i.e. if I want to use | to separate fields in the log, there's no way for
>me to ensure that one of the client-supplied fields won't contain a pipe.
>A fix for this is the ability to log fields with % escaping (need to
>escape % and the field delimiter only).
>
>What about log_status, which will also put a - in for 0?
>
>Dean
>
>On Wed, 19 Nov 1997, Randy Terbush wrote:
>
>>
>> Working to include some changes that allow logging to a central
>> database. Seems that logging a '-' for bytes sent when it == 0 is a
>> bug since we are trying to copy this data to integer fields in a
>> database. My guess is that changing this to log a '0' would cause
>> some other people grief. I've made a small change to
>> mod_log_config.c which allows you to specify %{int}b to log a '0'
>> intstead of '-'. It defaults to '-'.
>>
>> Index: mod_log_config.c
>> ===================================================================
>> RCS file:
/export/home/cvs/apachen/src/modules/standard/mod_log_config.c,v
>> retrieving revision 1.41
>> diff -c -r1.41 mod_log_config.c
>> *** mod_log_config.c 1997/10/22 20:30:24 1.41
>> --- mod_log_config.c 1997/11/19 19:48:45
>> ***************
>> *** 113,119 ****
>>    * literal characters copied into the log files, and '%' directives as
>>    * follows:
>>    *
>> !  * %...b:  bytes sent, excluding HTTP headers.
>>    * %...{FOOBAR}e:  The contents of the environment variable FOOBAR
>>    * %...f:  filename
>>    * %...h:  remote host
>> --- 113,120 ----
>>    * literal characters copied into the log files, and '%' directives as
>>    * follows:
>>    *
>> !  * %...b:  bytes sent, excluding HTTP headers. %{int}b logs zero bytes
sent
>> !  *         as a '0' instead of '-'.
>>    * %...{FOOBAR}e:  The contents of the environment variable FOOBAR
>>    * %...f:  filename
>>    * %...h:  remote host
>> ***************
>> *** 314,320 ****
>>
>>   static char *log_bytes_sent(request_rec *r, char *a)
>>   {
>> !     if (!r->sent_bodyct) {
>>           return "-";
>>       }
>>       else {
>> --- 315,324 ----
>>
>>   static char *log_bytes_sent(request_rec *r, char *a)
>>   {
>> !     if (!r->sent_bodyct && !strcasecmp(a, "int")) {
>> !         return "0";
>> !     }
>> !     else if (!r->sent_bodyct) {
>>           return "-";
>>       }
>>       else {
>>
>>
>>
>
>


Mime
View raw message