cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1999-12-15 Thread martin
martin  99/12/15 15:04:27

  Modified:src  CHANGES
   htdocs/manual/mod mod_log_config.html
   src/modules/standard mod_log_config.c
  Log:
  Peter Watkins writes:
  In September, there was discussion of mod_log_config and some need to
  break the client request %r into its separate components. A patch was
  committed to the 1.3 dev tree that exposed the method and protocol
  request members as %m and %H. It was noted that %m %U %H was not
  the same as %r because %U does not include query string information.
  The attached patches add support for logging query string in such a way
  that %m %U%q %H is the same as %r. I would like to see this committed
  to take care of the unfinished business begun with %m and %H.
  Thanks,
   -Peter
  
  PR: 5174
  Submitted by: Peter Watkins [EMAIL PROTECTED]
  Reviewed by:  Martin Kraemer
  
  Revision  ChangesPath
  1.1480+5 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1479
  retrieving revision 1.1480
  diff -u -r1.1479 -r1.1480
  --- CHANGES   1999/12/15 22:13:22 1.1479
  +++ CHANGES   1999/12/15 23:04:07 1.1480
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.10
   
  +  *) Add %q logging format directive (logs ? and the query string part
  + of a query, or the empty string if no query).
  + Can be used in combination with %m, %U and %H: %m %U%q %H is the
  + same as %r.  [Peter Watkins [EMAIL PROTECTED]]
  +
 *) Improve OS390 port to work on older system releases
[Paul Gilmartin [EMAIL PROTECTED]]
   
  
  
  
  1.36  +9 -7  apache-1.3/htdocs/manual/mod/mod_log_config.html
  
  Index: mod_log_config.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/mod_log_config.html,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- mod_log_config.html   1999/10/13 08:41:52 1.35
  +++ mod_log_config.html   1999/12/15 23:04:19 1.36
  @@ -121,24 +121,28 @@
   by the values as follows:
   
   PRE
  +%...a:  Remote IP-address
  +%...A:  Local IP-address
   %...B:  Bytes sent, excluding HTTP headers.
   %...b:  Bytes sent, excluding HTTP headers. In CLF format
i.e. a '-' rather than a 0 when no bytes are sent.
  -%...f:  Filename
   %...{FOOBAR}e:  The contents of the environment variable FOOBAR
  +%...f:  Filename
   %...h:  Remote host
  -%...a:  Remote IP-address
  -%...A:  Local IP-address
  +%...HThe request protocol
   %...{Foobar}i:  The contents of Foobar: header line(s) in the request
   sent to the server.
   %...l:  Remote logname (from identd, if supplied)
  +%...mThe request method
   %...{Foobar}n:  The contents of note Foobar from another module.
   %...{Foobar}o:  The contents of Foobar: header line(s) in the reply.
   %...p:  The canonical Port of the server serving the request
   %...P:  The process ID of the child that serviced the request.
  +%...qThe query string (prepended with a ? if a query string 
exists,
  + otherwise an empty string)
   %...r:  First line of request
  -%...s:  Status.  For requests that got internally redirected, this
  -is status of the *original* request --- %...gt;s for the 
last.
  +%...s:  Status.  For requests that got internally redirected, this is
  +the status of the *original* request --- %...gt;s for the 
last.
   %...t:  Time, in common log format time format (standard english 
format)
   %...{format}t:  The time, in the form given by format, which should
   be in strftime(3) format. (potentially localised)
  @@ -147,8 +151,6 @@
   %...U:  The URL path requested.
   %...v:  The canonical ServerName of the server serving the request.
   %...V:  The server name according to the UseCanonicalName setting.
  -%...mThe request method
  -%...HThe request protocol
   /PRE
   
   The `...' can be nothing at all (EMe.g./EM, CODE%h %u %r %s 
%b/CODE), or it can
  
  
  
  1.80  +10 -1 apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- mod_log_config.c  1999/09/27 20:38:46 1.79
  +++ mod_log_config.c  1999/12/15 23:04:22 1.80
  @@ -144,7 +144,8 @@
* %...v:  the configured name of the server (i.e. which virtual host?)
* %...V:  the server name according to the UseCanonicalName 

cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1999-09-27 Thread dirkx
dirkx   99/09/27 13:38:52

  Modified:src  CHANGES
   src/modules/standard mod_log_config.c
  Log:
  Added three log methods: CLF compliant '-' byte count, method and protocol.
  
  Revision  ChangesPath
  1.1435+8 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /x3/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1434
  retrieving revision 1.1435
  diff -u -r1.1434 -r1.1435
  --- CHANGES   1999/09/23 18:51:41 1.1434
  +++ CHANGES   1999/09/27 20:38:32 1.1435
  @@ -1,5 +1,13 @@
   Changes with Apache 1.3.10
   
  +  *) Added a CLF '-' respecting %B to the log format.
  + Suggested by Ragnar Kjørstad [dirkx]
  +
  +  *) Added protocol(%m)/method(%H) logging to the log format.
  + Suggested by Peter W [EMAIL PROTECTED] [dirkx]
  +
  +  *) Added a HEAD method to 'ab'. [dirkx]
  +
 *) When generating the Location: header, mod_speling forgot
to escape the spelling-fixed uri. [Martin Kraemer]
   
  
  
  
  1.79  +37 -3 apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /x3/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- mod_log_config.c  1999/06/22 00:51:35 1.78
  +++ mod_log_config.c  1999/09/27 20:38:46 1.79
  @@ -117,7 +117,9 @@
* literal characters copied into the log files, and '%' directives as
* follows:
*
  - * %...b:  bytes sent, excluding HTTP headers.
  + * %...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'.
* %...{FOOBAR}e:  The contents of the environment variable FOOBAR
* %...f:  filename
* %...h:  remote host
  @@ -141,6 +143,8 @@
* %...U:  the URL path requested.
* %...v:  the configured name of the server (i.e. which virtual host?)
* %...V:  the server name according to the UseCanonicalName setting
  + * %...m:  the request method
  + * %...h:  the request protocol
*
* The '...' can be nothing at all (e.g. %h %u %r %s %b), or it can
* indicate conditions for inclusion of the item (which will cause it
  @@ -334,12 +338,20 @@
   {
   return r-uri;
   }
  +static const char *log_request_method(request_rec *r, char *a)
  +{
  +return r-method;
  +}
  +static const char *log_request_protocol(request_rec *r, char *a)
  +{
  +return r-protocol;
  +}
   static const char *log_status(request_rec *r, char *a)
   {
   return pfmt(r-pool, r-status);
   }
   
  -static const char *log_bytes_sent(request_rec *r, char *a)
  +static const char *clf_log_bytes_sent(request_rec *r, char *a)
   {
   if (!r-sent_bodyct) {
   return -;
  @@ -351,6 +363,19 @@
   }
   }
   
  +static const char *log_bytes_sent(request_rec *r, char *a)
  +{
  +if (!r-sent_bodyct) {
  +return 0;
  +}
  +else {
  +long int bs;
  +ap_bgetopt(r-connection-client, BO_BYTECT, bs);
  + return ap_psprintf(r-pool, %ld, bs);
  +}
  +}
  +
  +
   static const char *log_header_in(request_rec *r, char *a)
   {
   return ap_table_get(r-headers_in, a);
  @@ -480,9 +505,12 @@
   's', log_status, 1
   },
   {
  -'b', log_bytes_sent, 0
  +'b', clf_log_bytes_sent, 0
   },
   {
  +'B', log_bytes_sent, 0
  +},
  +{
   'i', log_header_in, 0
   },
   {
  @@ -505,6 +533,12 @@
   },
   {
   'P', log_child_pid, 0
  +},
  +{
  +'H', log_request_protocol, 0
  +},
  +{
  +'m', log_request_method, 0
   },
   {
   '\0'
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1999-03-04 Thread dgaudet
dgaudet 99/03/04 11:28:41

  Modified:.STATUS
   htdocs/manual/mod mod_log_config.html
   src  CHANGES
   src/modules/standard mod_log_config.c
  Log:
  Commit %V and \n changes to mod_log_config.
  
  Submitted by: Tony Finch [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.634 +1 -11 apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.633
  retrieving revision 1.634
  diff -u -r1.633 -r1.634
  --- STATUS1999/03/03 12:58:50 1.633
  +++ STATUS1999/03/04 19:28:36 1.634
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 1999/03/03 12:58:50 $]
  +  Last modified at [$Date: 1999/03/04 19:28:36 $]
   
   Release:
   
  @@ -55,11 +55,6 @@
MID: [EMAIL PROTECTED]
Status: Ken +1, Lars +1 (untested)
   
  -* Tony Finch's [PATCH] mod_log_config: support for reliably parsable logs
  -  Allows use of C-style backslash escapes in mod_log_config format 
strings
  -MID: [EMAIL PROTECTED]
  -Status: 
  -
   * Ralf's [PATCH] Shared Memory Pools
   Message-ID: [EMAIL PROTECTED]
   Status: Roy?: Not sure if this is intended for 1.3.x or just feedback
  @@ -80,11 +75,6 @@
 ftp://ftp.kame.net/pub/kame/misc/apache-134-v6-19990118.diff.gz
   Message-ID: [EMAIL PROTECTED]
   Status: Lars +1 (on concept)
  -
  -* Tony Finch's [PATCH] to mod_log_config.c to get both the 1.3.3
  -  behaviour of %v and the 1.3.4 behaviour as %V.
  -Message-ID: [EMAIL PROTECTED]
  -Status: 
   
   * Ralf's patch to fix append of target name to layout paths
   Message-ID: [EMAIL PROTECTED]
  
  
  
  1.32  +1 -0  apache-1.3/htdocs/manual/mod/mod_log_config.html
  
  Index: mod_log_config.html
  ===
  RCS file: /home/cvs/apache-1.3/htdocs/manual/mod/mod_log_config.html,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mod_log_config.html   1999/02/22 16:41:06 1.31
  +++ mod_log_config.html   1999/03/04 19:28:37 1.32
  @@ -143,6 +143,7 @@
   %...u:  Remote user (from auth; may be bogus if return status (%s) 
is 401)
   %...U:  The URL path requested.
   %...v:  The canonical ServerName of the server serving the request.
  +%...V:  The server name according to the UseCanonicalName setting.
   /PRE
   
   The `...' can be nothing at all (EMe.g./EM, CODE%h %u %r %s 
%b/CODE), or it can
  
  
  
  1.1259+7 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1258
  retrieving revision 1.1259
  diff -u -r1.1258 -r1.1259
  --- CHANGES   1999/02/27 17:39:46 1.1258
  +++ CHANGES   1999/03/04 19:28:38 1.1259
  @@ -1,5 +1,12 @@
   Changes with Apache 1.3.5
   
  +  *) Add %V to mod_log_config, this logs the hostname according to the
  + UseCanonicalName setting (this is the pre-1.3.4 behaviour of
  + %v).  Useful for mass vhosting.  [Tony Finch [EMAIL PROTECTED]]
  +
  +  *) Add support for \n and \t to mod_log_config, can be used to produce
  + more reliable logs with multiline entries.  [Tony Finch [EMAIL 
PROTECTED]]
  +
 *) Fixed a few compiler nits.  [John Bley [EMAIL PROTECTED]]
   
 *) Added some informative error messages for some failed malloc()
  
  
  
  1.76  +58 -15apache-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.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- mod_log_config.c  1999/02/20 00:13:27 1.75
  +++ mod_log_config.c  1999/03/04 19:28:40 1.76
  @@ -138,7 +138,8 @@
* %...T:  the time taken to serve the request, in seconds.
* %...u:  remote user (from auth; may be bogus if return status (%s) is 401)
* %...U:  the URL path requested.
  - * %...v:  the name of the server (i.e. which virtual host?)
  + * %...v:  the configured name of the server (i.e. which virtual host?)
  + * %...V:  the server name according to the UseCanonicalName setting
*
* The '...' can be nothing at all (e.g. %h %u %r %s %b), or it can
* indicate conditions for inclusion of the item (which will cause it
  @@ -417,6 +418,14 @@
r-server-port ? r-server-port : ap_default_port(r));
   }
   
  +/* This respects the setting of UseCanonicalName so that
  + * the dynamic mass virtual hosting trick works better.
  + */
  +static const char *log_server_name(request_rec *r, char *a)
  +{
  +return ap_get_server_name(r);
  +}
  +
   static const char *log_child_pid(request_rec 

cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1999-02-18 Thread coar
coar99/02/18 11:28:22

  Modified:src/modules/standard mod_log_config.c
  Log:
D'oh!  (!fmt) accidentally turned into (fmt != NULL),
inverting the logic and causing a NULL pointer to be passed
where it wasn't permitted.
  
  Obtained from:Ask Bjoern Hansen [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.74  +1 -1  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.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- mod_log_config.c  1999/02/17 23:28:17 1.73
  +++ mod_log_config.c  1999/02/18 19:28:21 1.74
  @@ -935,7 +935,7 @@
   
   cls-fname = fn;
   cls-format_string = fmt;
  -if (fmt != NULL) {
  +if (fmt == NULL) {
   cls-format = NULL;
   }
   else {
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1999-02-17 Thread coar
coar99/02/17 15:28:20

  Modified:htdocs/manual/mod mod_log_config.html
   src  CHANGES
   src/modules/standard mod_log_config.c
  Log:
Add conditional logging based upon environment variable existence.
Also add RefererIgnore functionality from mod_log_referer to
mod_log_config; mod_log_referer and mod_log_agent are now
deprecated.  The list of envariables to check is set up as
an array even though the current implementation (TAKE23)
only handles one; just in case we ever want to do something
strange like, 'env=foo,bar,!bag'.
  
  PR:   519, 548, 1351, 1811(?), 3449
  
  Revision  ChangesPath
  1.29  +133 -10   apache-1.3/htdocs/manual/mod/mod_log_config.html
  
  Index: mod_log_config.html
  ===
  RCS file: /home/cvs/apache-1.3/htdocs/manual/mod/mod_log_config.html,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- mod_log_config.html   1998/09/17 12:33:07 1.28
  +++ mod_log_config.html   1999/02/17 23:28:11 1.29
  @@ -14,22 +14,23 @@
   
   !--#include virtual=header.html --
   H1 ALIGN=CENTERModule mod_log_config/H1
  -
  +P
   This module is contained in the CODEmod_log_config.c/CODE file,
   and is compiled in by default in Apache 1.2. mod_log_config replaces
   mod_log_common in Apache 1.2. Prior to version 1.2, mod_log_config was
   an optional module. It provides for logging of the requests made to
   the server, using the Common Log Format or a user-specified format.
  +/P
   
   H2Summary/H2
  -
  +P
   Three directives are provided by this module: CODETransferLog/CODE
   to create a log file, CODELogFormat/CODE to set a custom format,
   and CODECustomLog/CODE to define a log file and format in one go.
   The CODETransferLog/CODE and CODECustomLog/CODE directives can
   be used multiple times in each server to cause each request to be
   logged to multiple files.
  -P
  +/P
   
   H3Compatibility notes/H3
   
  @@ -45,6 +46,22 @@
   CODECookieLog/CODE is deprecated, and a CODECustomLog/CODE
   should be defined to log user-tracking information instead.
   
  +LIAs of Apache 1.3.5, this module allows conditional logging
  +based upon the setting of environment variables.  That is,
  +you can control whether a request should be logged or not
  +based upon whether an arbitrary environment variable is
  +defined or not.  This is settable on a EMper/EM-logfile
  +basis.
  +
  +LIBeginning with Apache 1.3.5, the mod_log_config module has
  +also subsumed the CODERefererIgnore/CODE directive from
  +A HREF=mod_log_referer.htmlmod_log_referer/A.  The use
  +of CODERefererIgnore/CODE is deprecated, and should be
  +replaced by combinations of
  +A HREF=mod_setenvif.htmlCODESetEnvIf/CODE/A directives
  +and environment variable controlled CODECustomLog/CODE
  +definitions.
  +
   /UL
   
   H2Log File Formats/H2
  @@ -195,7 +212,9 @@
   UL
   LIA HREF=#cookielogCookieLog/A
   LIA HREF=#customlogCustomLog/A
  +LIA HREF=#customlog-conditionalCustomLog (conditional)/A
   LIA HREF=#logformatLogFormat/A
  +LIA HREF=#refererignoreRefererIgnore/A
   LIA HREF=#transferlogTransferLog/A
   /UL
   HR
  @@ -223,8 +242,8 @@
   The CookieLog directive sets the filename for logging of cookies.
   The filename is relative to the A
   HREF=core.html#serverrootServerRoot/A. This directive is included
  -only for compatibility with A
  -HREF=mod_cookies.htmlmod_cookies/A, and is deprecated.
  +only for compatibility with
  +A HREF=mod_cookies.htmlmod_cookies/A, and is deprecated.
   P
   
   HR
  @@ -242,7 +261,10 @@
HREF=directive-dict.html#Status
REL=Help
   STRONGStatus:/STRONG/A BaseBR
  -STRONGCompatibility: /STRONG Nickname only available in Apache 1.3
  +A
  + HREF=directive-dict.html#Compatibility
  + REL=Help
  +STRONGCompatibility:/STRONG/A Nickname only available in Apache 1.3
   or later
   BR
   A
  @@ -274,7 +296,58 @@
   SAMPLogFormat/SAMP/A
   directive.
   /P
  +
   HR
  +H2A NAME=customlog-conditionalCustomLog (conditional)/A/H2
  +A
  + HREF=directive-dict.html#Syntax
  + REL=Help
  +STRONGSyntax:/STRONG/A CustomLog EMfile-pipe/EM
  +EMformat-or-nickname/EM
  +env=[!]EMenvironment-variable/EMBR
  +A
  + HREF=directive-dict.html#Context
  + REL=Help
  +STRONGContext:/STRONG/A server config, virtual hostBR
  +A
  + HREF=directive-dict.html#Status
  + REL=Help
  +STRONGStatus:/STRONG/A BaseBR
  +A
  + HREF=directive-dict.html#Compatibility
  + REL=Help
  +STRONGCompatibility:/STRONG/A Only available in Apache 1.3.5
  +or later
  +BR
  +A
  + HREF=directive-dict.html#Module
  + REL=Help
  +STRONGModule:/STRONG/A mod_log_config
  +P
  +
  +The behaviour of this form of the SAMPCustomLog/SAMP directive is almost
  +identical to the A HREF=#customlogstandard CODECustomLog/CODE/A
  +directive.  The difference is that the 'CODEenv=/CODE' clause controls
  +whether a 

cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1999-02-02 Thread dirkx
dirkx   99/02/02 08:15:52

  Modified:.STATUS
   src/modules/standard mod_log_config.c
  Log:
  Holed up in Africa. No flights out. Bored. Fetched and tried some patches. 
More Tomorrow
  
  Revision  ChangesPath
  1.609 +17 -10apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.608
  retrieving revision 1.609
  diff -u -r1.608 -r1.609
  --- STATUS1999/01/31 21:54:01 1.608
  +++ STATUS1999/02/02 16:15:50 1.609
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 1999/01/31 21:54:01 $]
  +  Last modified at [$Date: 1999/02/02 16:15:50 $]
   
   Release:
   
  @@ -48,7 +48,7 @@
   
   * Roy's [PATCH] Core dump with Language Negotiation?!?
   Message-ID: [EMAIL PROTECTED]
  -Status: Roy +1
  +Status: Roy +1 Dirkx +1
   
   * Tony Finch's [PATCH] to mod_log_config.c to get both the 1.3.3
 behaviour of %v and the 1.3.4 behaviour as %V.
  @@ -61,7 +61,7 @@
   
   * Ralf's adjusted version of Fred's Add strip flags variables
   Message-ID: [EMAIL PROTECTED]
  -Status: Ralf +1
  +Status: Ralf +1 Dirkx +1
   
   * Fred's PATCH: Add strip flags variables in Makefile.tmpl
   Message-ID: [EMAIL PROTECTED]
  @@ -69,7 +69,7 @@
   
   * Fred's PATCH: man page section numbers
   Message-ID: [EMAIL PROTECTED]
  -Status: Ralf +1, Roy +1
  +Status: Ralf +1, Roy +1, Dirkx +1
   
   * Fred's PATCH: Add cgidir, htdocsdir, iconsdir variables in 
Makefile.tmpl
   Message-ID: [EMAIL PROTECTED]
  @@ -77,7 +77,7 @@
   
   * Fred's PATCH: Add Mac OS X Server Layout file layout
   Message-ID: [EMAIL PROTECTED]
  -Status: Roy +1
  +Status: Roy +1, Dirkx +0
   
   * Jim Patterson's patch to make mod_info work on Win32
   Message-ID: PR#1442
  @@ -93,7 +93,7 @@
   
   * Ronald Tschalär's ap_uuencode() bugfix
   Message-ID: PR#3411
  -Status: Lars +1 (on concept)
  +Status: Lars +1 (on concept), Dirkx +1
   
   * Michael van Elst's patch [PR#3160] to improve mod_rewrite's
 in-core cache handling by using a hash table.
  @@ -171,12 +171,16 @@
   Status: Lars' patch was vetoed.  Roy and Dean think that it is
   probably another buffer magic number error and should be
   tested to find out and, if so, fixed like it was in core.
  + Dirkx: cannot reproduce this at all.
   
   * ap_escape_html() always duplicates the string, even when there is
 no change and the caller would be happy to use the original.
 What is needed is a separate interface for don't need a dup
 situations, like just about everywhere we use it in bvputs and
 bputs calls.
  +  dirkx: -1 (as some of the modules from modules.apache.org seem
  + (rightly?) to assume that they can modify the returned escaped
  + string whilst relying on the passed string not to be damaged.
   
   * Should we disallow requests with bogus characters in the method?
 See [EMAIL PROTECTED]
  @@ -209,17 +213,17 @@
   
   * Maybe a http_paths.h file? See
[EMAIL PROTECTED]
  - +1: Brian, Paul, Ralf, Martin
  + +1: Brian, Paul, Ralf, Martin, Dirkx
+0: Jim (not for 1.3.0)
   
   * Release builds: Should we provide Configuration or not?
 Should we 'make all suexec' in src/support?
  - +1: Brian, Jim, Ken +1 (possible suexec path issue, though)
  + +1: Brian, Jim, Dirkx, Ken +1 (possible suexec path issue, though)
   
   * root's environment is inherited by the Apache server. Jim  Ken
 think we should recommend using 'env' to build the
 appropriate environment. Marc and Alexei don't see any
  -  big deal. Martin says that not every env has a -u flag.
  +  big deal. Martin says that not every env has a -u flag. 
   
   * Marc's socket options like source routing (kill them?)
Marc, Martin say Yes
  @@ -235,7 +239,9 @@
  field is r-content_languages.  Heck it's not even mentioned in
  apache-devsite/mmn.txt when we got content_languages (note the s!).
  The proposal is to remove r-content_language:
  - Status: Paul +1, Ralf +1, Ken +1, Martin +1
  + Status: Paul +1, Ralf +1, Ken +1, Martin +1, Dirkx +1 (I could
  + not find ANY module which uses it and which (still) compiles
  + after the config change.)
   
- child_exit() is redundant, it can be implemented via cleanups.  It is
  not symmetric in the sense that there is no exit API method to go
  @@ -260,6 +266,7 @@
unless we warn people in big nasty letters to add
PassEnv TZ to their config files just in case
and hope they do it :)
  +   Dirkx: Is not this the 

cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1999-02-02 Thread dirkx
dirkx   99/02/02 08:21:23

  Modified:src/modules/standard mod_log_config.c
  Log:
  Oops. You should not leave your comments floating around whilst checking the 
%m milisecond code
  
  Revision  ChangesPath
  1.72  +0 -3  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.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- mod_log_config.c  1999/02/02 16:15:51 1.71
  +++ mod_log_config.c  1999/02/02 16:21:20 1.72
  @@ -397,9 +397,6 @@
   return ap_pstrdup(r-pool, tstr);
   }
   
  -/* : bullshit. needs to be done using gettimeofday() when possible
  - * and not this time, as it is the time the LOGging hapens.
  - */
   static const char *log_request_duration(request_rec *r, char *a)
   {
   return ap_psprintf(r-pool, %ld, time(NULL) - r-request_time);
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-12-23 Thread dgaudet
dgaudet 98/12/23 10:34:27

  Modified:src  CHANGES
   src/modules/standard mod_log_config.c
  Log:
  For %v log ServerName regardless of the UseCanonicalName
  setting (similarly for %p).
  
  Revision  ChangesPath
  1.1177+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1176
  retrieving revision 1.1177
  diff -u -r1.1176 -r1.1177
  --- CHANGES   1998/12/23 00:36:12 1.1176
  +++ CHANGES   1998/12/23 18:34:19 1.1177
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.4
   
  +  *) For %v log ServerName regardless of the UseCanonicalName
  + setting (similarly for %p).  [Dean Gaudet]
  +
 *) Configure was initializing the variables $OSDIR, $INCDIR and $SHELL
rather late (too late for some invocations of TestCompile).
This improves the make environment available to TestCompile and
  
  
  
  1.69  +3 -2  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.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- mod_log_config.c  1998/12/02 00:00:16 1.68
  +++ mod_log_config.c  1998/12/23 18:34:25 1.69
  @@ -407,12 +407,13 @@
*/
   static const char *log_virtual_host(request_rec *r, char *a)
   {
  -return ap_get_server_name(r);
  +return r-server-server_hostname;
   }
   
   static const char *log_server_port(request_rec *r, char *a)
   {
  -return ap_psprintf(r-pool, %u, ap_get_server_port(r));
  +return ap_psprintf(r-pool, %u,
  + r-server-port ? r-server-port : ap_default_port(r));
   }
   
   static const char *log_child_pid(request_rec *r, char *a)
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-09-22 Thread rse
rse 98/09/22 02:20:00

  Modified:src  CHANGES
   src/modules/standard mod_log_config.c
  Log:
  Correct comment in mod_log_config.c about its internals.
  
  Submitted by: Elf Sternberg [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.1072+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1071
  retrieving revision 1.1072
  diff -u -r1.1071 -r1.1072
  --- CHANGES   1998/09/21 20:44:41 1.1071
  +++ CHANGES   1998/09/22 09:19:51 1.1072
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.3
   
  +  *) Correct comment in mod_log_config.c about its internals.
  + [Elf Sternberg [EMAIL PROTECTED]]
  +
 *) Avoid possible line overflow in Configure: Use an awkfile to
handle the creation of modules.c [Jim Jagielski]
   
  
  
  
  1.67  +3 -4  apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- mod_log_config.c  1998/08/03 09:15:12 1.66
  +++ mod_log_config.c  1998/09/22 09:19:59 1.67
  @@ -202,10 +202,9 @@
* multi_log_state is our per-(virtual)-server configuration. We store
* an array of the logs we are going to use, each of type config_log_state.
* If a default log format is given by LogFormat, store in default_format
  - * (backward compat. with mod_log_config). We also store a pointer to
  - * the logs specified for the main server for virtual servers, so that
  - * if this vhost has now logs defined, we can use the main server's
  - * logs instead.
  + * (backward compat. with mod_log_config).  We also store for each virtual
  + * server a pointer to the logs specified for the main server, so that if 
this
  + * vhost has no logs defined, we can use the main server's logs instead.
*
* So, for the main server, config_logs contains a list of the log files
* and server_config_logs in empty. For a vhost, server_config_logs
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-06-23 Thread dgaudet
dgaudet 98/06/23 00:25:32

  Modified:src/modules/standard mod_log_config.c
  Log:
  fix a multithreaded bug that I'm sure Ben didn't intend to introduce
  between rev 1.61 and 1.62 ;)
  
  Revision  ChangesPath
  1.64  +2 -2  apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- mod_log_config.c  1998/06/17 06:39:34 1.63
  +++ mod_log_config.c  1998/06/23 07:25:32 1.64
  @@ -374,7 +374,7 @@
   {
   int timz;
   struct tm *t;
  -static char tstr[MAX_STRING_LEN];
  +char tstr[MAX_STRING_LEN];
   
   t = ap_get_gmtoff(timz);
   
  @@ -395,7 +395,7 @@
   %c%.2d%.2d], sign, timz / 60, timz % 60);
   }
   
  -return tstr;
  +return ap_pstrdup(r-pool, tstr);
   }
   
   static const char *log_request_duration(request_rec *r, char *a)
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-06-17 Thread dgaudet
dgaudet 98/06/16 23:39:36

  Modified:src/modules/standard mod_log_config.c
  Log:
  fix problem with previous fix to the log format stuff... it didn't work
  right in the main server.
  
  PR:   2090
  Submitted by: Christof Damian [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.63  +22 -25apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- mod_log_config.c  1998/06/14 21:10:27 1.62
  +++ mod_log_config.c  1998/06/17 06:39:34 1.63
  @@ -805,8 +805,6 @@
   {
   multi_log_state *base = (multi_log_state *) basev;
   multi_log_state *add = (multi_log_state *) addv;
  -const char *format;
  -const char *dummy;
   
   add-server_config_logs = base-config_logs;
   if (!add-default_format) {
  @@ -815,29 +813,6 @@
   }
   add-formats = ap_overlay_tables(p, base-formats, add-formats);
   
  -if (add-default_format_string) {
  - format = ap_table_get(add-formats, add-default_format_string);
  - if (format) {
  - add-default_format = parse_log_string(p, format, dummy);
  - }
  -}
  -
  -if (add-config_logs) {
  - config_log_state *clsarray = (config_log_state *) 
add-config_logs-elts;
  - int i;
  -
  - for (i = 0; i  add-config_logs-nelts; ++i) {
  - config_log_state *cls = clsarray[i];
  -
  - if (cls-format_string) {
  - format = ap_table_get(add-formats, cls-format_string);
  - if (format) {
  - cls-format = parse_log_string(p, format, dummy);
  - }
  - }
  - }
  -}
  -
   return add;
   }
   
  @@ -957,7 +932,15 @@
config_log_module);
   config_log_state *clsarray;
   const char *dummy;
  +const char *format;
   
  +if (mls-default_format_string) {
  + format = ap_table_get(mls-formats, mls-default_format_string);
  + if (format) {
  + mls-default_format = parse_log_string(p, format, dummy);
  + }
  +}
  +
   if (!mls-default_format) {
   mls-default_format = parse_log_string(p, DEFAULT_LOG_FORMAT, 
dummy);
   }
  @@ -967,6 +950,13 @@
   for (i = 0; i  mls-config_logs-nelts; ++i) {
   config_log_state *cls = clsarray[i];
   
  + if (cls-format_string) {
  + format = ap_table_get(mls-formats, cls-format_string);
  + if (format) {
  + cls-format = parse_log_string(p, format, dummy);
  + }
  + }
  +
   cls = open_config_log(s, p, cls, mls-default_format);
   }
   }
  @@ -974,6 +964,13 @@
   clsarray = (config_log_state *) mls-server_config_logs-elts;
   for (i = 0; i  mls-server_config_logs-nelts; ++i) {
   config_log_state *cls = clsarray[i];
  +
  + if (cls-format_string) {
  + format = ap_table_get(mls-formats, cls-format_string);
  + if (format) {
  + cls-format = parse_log_string(p, format, dummy);
  + }
  + }
   
   cls = open_config_log(s, p, cls, mls-default_format);
   }
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-06-09 Thread dgaudet
dgaudet 98/06/08 21:36:47

  Modified:src  CHANGES
   src/modules/standard mod_log_config.c
  Log:
  fix the inheritance of log formats from main server to vhosts
  
  Submitted by: Christof Damian [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.898 +3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.897
  retrieving revision 1.898
  diff -u -r1.897 -r1.898
  --- CHANGES   1998/06/08 06:26:14 1.897
  +++ CHANGES   1998/06/09 04:36:44 1.898
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.1
   
  +  *) mod_log_config wouldn't let vhosts use log formats defined in the
  + main server.  [Christof Damian [EMAIL PROTECTED]]
  +
 *) mod_usertrack was corrupting the client hostname.  As part of the
fix, the cookie values were slightly extended to include the
fully qualified hostname of the client.  [Dean Gaudet] PR#2229, 2366
  
  
  
  1.60  +33 -13apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- mod_log_config.c  1998/05/29 08:18:51 1.59
  +++ mod_log_config.c  1998/06/09 04:36:47 1.60
  @@ -215,6 +215,7 @@
*/
   
   typedef struct {
  +char *default_format_string;
   array_header *default_format;
   array_header *config_logs;
   array_header *server_config_logs;
  @@ -232,6 +233,7 @@
   
   typedef struct {
   char *fname;
  +char *format_string;
   array_header *format;
   int log_fd;
   #ifdef BUFFERED_LOGS
  @@ -782,6 +784,7 @@
   multi_log_state *mls = (multi_log_state *) ap_palloc(p, 
sizeof(multi_log_state));
   
   mls-config_logs = ap_make_array(p, 1, sizeof(config_log_state));
  +mls-default_format_string = NULL;
   mls-default_format = NULL;
   mls-server_config_logs = NULL;
   mls-formats = ap_make_table(p, 4);
  @@ -800,13 +803,39 @@
   {
   multi_log_state *base = (multi_log_state *) basev;
   multi_log_state *add = (multi_log_state *) addv;
  +char *format;
  +const char *dummy;
   
   add-server_config_logs = base-config_logs;
   if (!add-default_format) {
  +add-default_format_string = base-default_format_string;
   add-default_format = base-default_format;
   }
   add-formats = ap_overlay_tables(p, base-formats, add-formats);
   
  +if (add-default_format_string) {
  + format = ap_table_get(add-formats, add-default_format_string);
  + if (format) {
  + add-default_format = parse_log_string(p, format, dummy);
  + }
  +}
  +
  +if (add-config_logs) {
  + config_log_state *clsarray = (config_log_state *) 
add-config_logs-elts;
  + int i;
  +
  + for (i = 0; i  add-config_logs-nelts; ++i) {
  + config_log_state *cls = clsarray[i];
  +
  + if (cls-format_string) {
  + format = ap_table_get(add-formats, cls-format_string);
  + if (format) {
  + cls-format = parse_log_string(p, format, dummy);
  + }
  + }
  + }
  +}
  +
   return add;
   }
   
  @@ -817,7 +846,6 @@
 char *name)
   {
   const char *err_string = NULL;
  -char *format;
   multi_log_state *mls = ap_get_module_config(cmd-server-module_config,
config_log_module);
   
  @@ -833,14 +861,8 @@
   }
   }
   else {
  -/*
  - * See if we were given a name rather than a format string.
  - */
  -format = ap_table_get(mls-formats, fmt);
  -if (format == NULL) {
  -format = fmt;
  -}
  -mls-default_format = parse_log_string(cmd-pool, format, 
err_string);
  +mls-default_format_string = fmt;
  +mls-default_format = parse_log_string(cmd-pool, fmt, err_string);
   }
   return err_string;
   }
  @@ -852,17 +874,15 @@
   multi_log_state *mls = ap_get_module_config(cmd-server-module_config,
config_log_module);
   config_log_state *cls;
  -char *format;
   
   cls = (config_log_state *) ap_push_array(mls-config_logs);
   cls-fname = fn;
  +cls-format_string = fmt;
   if (!fmt) {
   cls-format = NULL;
   }
   else {
  -format = ap_table_get(mls-formats, fmt);
  -format = (format != NULL) ? format : fmt;
  -cls-format = parse_log_string(cmd-pool, format, err_string);
  +cls-format = parse_log_string(cmd-pool, fmt, err_string);
   }
   cls-log_fd = -1;
   
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-05-20 Thread brian
brian   98/05/20 05:15:08

  Modified:src/modules/standard mod_log_config.c
  Log:
  PR: 2111
  
  Update the comment.
  
  Revision  ChangesPath
  1.57  +6 -5  apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mod_log_config.c  1998/05/05 04:47:58 1.56
  +++ mod_log_config.c  1998/05/20 12:15:07 1.57
  @@ -222,11 +222,12 @@
   } multi_log_state;
   
   /*
  - * config_log_state holds the status of a single log file. fname cannot
  - * be NULL. format might be NULL, in which case the default_format from
  - * the multi_log_state should be used, or if that is NULL as well, use
  - * the CLF. log_fd is -1 before the log file is opened and set to a valid
  - * fd after it is opened.
  + * config_log_state holds the status of a single log file. fname might
  + * be NULL, which means this module does no logging for this
  + * request. format might be NULL, in which case the default_format
  + * from the multi_log_state should be used, or if that is NULL as
  + * well, use the CLF. log_fd is -1 before the log file is opened and
  + * set to a valid fd after it is opened.
*/
   
   typedef struct {
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-04-30 Thread dgaudet
dgaudet 98/04/29 16:46:03

  Modified:src/modules/standard mod_log_config.c
  Log:
  don't call strlen twice with the same arg
  
  Revision  ChangesPath
  1.55  +3 -1  apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- mod_log_config.c  1998/04/27 06:59:36 1.54
  +++ mod_log_config.c  1998/04/29 23:46:03 1.55
  @@ -379,13 +379,15 @@
   }
   else {  /* CLF format */
   char sign = (timz  0 ? '-' : '+');
  + size_t l;
   
   if (timz  0) {
   timz = -timz;
   }
   
   strftime(tstr, MAX_STRING_LEN, [%d/%b/%Y:%H:%M:%S , t);
  -ap_snprintf(tstr + strlen(tstr), sizeof(tstr) - strlen(tstr),
  + l = strlen(tstr);
  +ap_snprintf(tstr + l, sizeof(tstr) - l,
   %c%.2d%.2d], sign, timz / 60, timz % 60);
   }
   
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-03-15 Thread dgaudet
dgaudet 98/03/15 15:21:44

  Modified:src  CHANGES
   src/modules/standard mod_log_config.c
  Log:
  less function call overhead in mod_log_config.
  
  Submitted by: Dmitry Khrustalev [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.714 +2 -0  apache-1.3/src/CHANGES
  
  Index: From [EMAIL PROTECTED] Mon Mar 16 07:39:58 1998
Return-Path: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 6957 invoked by uid 6000); 16 Mar 1998 07:39:58 -
Received: (qmail 6942 invoked by alias); 16 Mar 1998 07:39:56 -
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 6940 invoked by uid 143); 16 Mar 1998 07:39:56 -
Date: 16 Mar 1998 07:39:56 -
Message-ID: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: cvs commit: apache-1.3 HTTP_Features.tsv
Sender: [EMAIL PROTECTED]
Precedence: bulk
Reply-To: new-httpd@apache.org

dgaudet 98/03/15 23:39:55

  Modified:.HTTP_Features.tsv
  Log:
  this is as far as I got before I was confused with how to fill this out... 
see new-httpd
  
  Revision  ChangesPath
  1.2   +15 -14apache-1.3/HTTP_Features.tsv
  
  Index: HTTP_Features.tsv
  ===
  RCS file: /export/home/cvs/apache-1.3/HTTP_Features.tsv,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HTTP_Features.tsv 1998/03/10 02:03:47 1.1
  +++ HTTP_Features.tsv 1998/03/16 07:39:55 1.2
  @@ -6,22 +6,23 @@
-   means not applicable
n   means no
y   means yes   
  + Y   means yes with the addition of a module that uses feature

   Section  Feature Implemented Tested
  -8.1  Persistent Connections  ?   ?
  -8.2.3Automatic retrying of requests  ?   ?
  -8.2.4Use of the 100 (Continue) status?   ?
  -9.2  OPTIONS ?   ?
  -9.3  GET ?   ?
  -9.4  HEAD?   ?
  -9.5  POST?   ?
  -9.6  PUT ?   ?
  -9.7  DELETE  ?   ?
  -9.8  TRACE   ?   ?
  -9.9  CONNECT ?   ?
  -10.1.1   100 Continue?   ?
  -10.1.2   101 Switching Protocols ?   ?
  -10.2.1   200 OK  ?   ?
  +8.1  Persistent Connections  y   ?
  +8.2.3Automatic retrying of requests  -   ?
  +8.2.4Use of the 100 (Continue) statusn   ?
  +9.2  OPTIONS y   ?
  +9.3  GET y   ?
  +9.4  HEADy   ?
  +9.5  POSTy   ?
  +9.6  PUT y   ?
  +9.7  DELETE  y   ?
  +9.8  TRACE   y   ?
  +9.9  CONNECT y   ?
  +10.1.1   100 Continuen   ?
  +10.1.2   101 Switching Protocols n   ?
  +10.2.1   200 OK  y   ?
   10.2.2   201 Created ?   ?
   10.2.3   202 Accepted?   ?
   10.2.4   203 Non-Authoritative Information   ?   ?
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-03-03 Thread dgaudet
dgaudet 98/03/03 00:31:29

  Modified:src/modules/standard mod_log_config.c
  Log:
  explain why we don't use get_server_port and get_server_name in mod_log_config
  
  Revision  ChangesPath
  1.47  +3 -0  apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- mod_log_config.c  1998/03/02 06:51:18 1.46
  +++ mod_log_config.c  1998/03/03 08:31:28 1.47
  @@ -401,6 +401,9 @@
   return pstrdup(r-pool, duration);
   }
   
  +/* These next two routines use the canonical name:port so that log
  + * parsers don't need to duplicate all the vhost parsing crud.
  + */
   static char *log_virtual_host(request_rec *r, char *a)
   {
   return pstrdup(r-pool, r-server-server_hostname);
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-02-28 Thread Ralf S. Engelschall
rse 98/02/28 00:12:50

  Modified:src  CHANGES
   htdocs/manual/mod mod_log_config.html
   src/modules/standard mod_log_config.c
  Log:
  Add %a to mod_log_config for inserting the remote IP-address.  This is the
  adapted patch against 1.3 of Todd Eigenschink [EMAIL PROTECTED]'s original
  patch for 1.2.5. For 1.2.5 we don't want it because its a feature.  I also
  added corresponding entries to the CHANGES and mod_log_config.html file.
  
  Submitted by: Todd Eigenschink [EMAIL PROTECTED]
  Reviewed by: Ralf S. Engelschall
  
  Revision  ChangesPath
  1.672 +3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.671
  retrieving revision 1.672
  diff -u -r1.671 -r1.672
  --- CHANGES   1998/02/27 15:15:13 1.671
  +++ CHANGES   1998/02/28 08:12:46 1.672
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b6
   
  +  *) Add the `%a' construct to LogFormat and CustomLog to log the client IP
  + address. [Todd Eigenschink [EMAIL PROTECTED], PR#1885]
  +
 *) For testing purposes, I added a new source called main/util_uri.c;
It contains a routine parse_uri_components_regex() and friends which
tries to break an URI into its parts. These parts are stored in a new
  
  
  
  1.24  +1 -0  apache-1.3/htdocs/manual/mod/mod_log_config.html
  
  Index: mod_log_config.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/mod_log_config.html,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- mod_log_config.html   1998/02/05 20:04:53 1.23
  +++ mod_log_config.html   1998/02/28 08:12:48 1.24
  @@ -110,6 +110,7 @@
   %...f:  Filename
   %...{FOOBAR}e:  The contents of the environment variable FOOBAR
   %...h:  Remote host
  +%...a:  Remote IP-address
   %...{Foobar}i:  The contents of Foobar: header line(s) in the request
   sent to the server.
   %...l:  Remote logname (from identd, if supplied)
  
  
  
  1.45  +9 -0  apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mod_log_config.c  1998/02/27 15:15:28 1.44
  +++ mod_log_config.c  1998/02/28 08:12:49 1.45
  @@ -117,6 +117,7 @@
* %...{FOOBAR}e:  The contents of the environment variable FOOBAR
* %...f:  filename
* %...h:  remote host
  + * %...a:  remote IP-address
* %...{Foobar}i:  The contents of Foobar: header line(s) in the request
* sent to the client.
* %...l:  remote logname (from identd, if supplied)
  @@ -276,6 +277,11 @@
   REMOTE_NAME);
   }
   
  +static char *log_remote_address(request_rec *r, char *a)
  +{
  +return r-connection-remote_ip;
  +}
  +
   static char *log_remote_logname(request_rec *r, char *a)
   {
   return (char *) get_remote_logname(r);
  @@ -432,6 +438,9 @@
   
   {
   'h', log_remote_host, 0
  +},
  +{   
  +'a', log_remote_address, 0 
   },
   {
   'l', log_remote_logname, 0
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_log_config.c

1998-02-27 Thread martin
martin  98/02/27 07:15:30

  Modified:src  CHANGES
   src/include httpd.h
   src/main Makefile.tmpl http_main.c http_protocol.c
http_request.c http_vhost.c
   src/modules/proxy mod_proxy.c mod_proxy.h proxy_http.c
proxy_util.c
   src/modules/standard mod_log_config.c
  Added:   src/include util_uri.h
   src/main util_uri.c
  Log:
  For testing purposes, I added a new source called main/util_uri.c;
  It contains a routine parse_uri_components_regex() and friends which
  tries to break an URI into its parts. These parts are stored in a new
  uri_components structure within each request_rec and are therefore
  available to all routines which act on a request.
  Additionally, an unparse routine is supplied which re-assembles the
  URI components back to an URI, optionally hiding the username:password@
  part from ftp proxy requests, and other useful routines.
  Within the structure, you find on a ready-for-use basis:
 scheme; /* scheme (http/ftp/...) */
 hostinfo;   /* combined [user[:[EMAIL PROTECTED]:port] */
 user;   /* user name, as in http://user:[EMAIL PROTECTED]:port/ */
 password;   /* password, as in http://user:[EMAIL PROTECTED]:port/ */
 hostname;   /* hostname from URI (or from Host: header) */
 port_str;   /* port string (integer representation is in port) */
 path;   /* the request path (or / if only scheme://host was given) */
 query;  /* Everything after a '?' in the path, if present */
 fragment;   /* Trailing #fragment string, if present */
  plus flags to indicate whether the strings have valid values.
  This is meant to serve as the platform for *BIG* savings in
  code complexity for the proxy module (and maybe the vhost logic).
  NOTE: This code is enabled only if the WITH_UTIL_URI define is set;
  currently this is not enabled by default.  [Martin Kraemer]
  
  Reviewed by: Dean Gaudet (on a previous occasion)
  
  Revision  ChangesPath
  1.671 +24 -0 apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.670
  retrieving revision 1.671
  diff -u -u -r1.670 -r1.671
  --- CHANGES   1998/02/27 14:55:02 1.670
  +++ CHANGES   1998/02/27 15:15:13 1.671
  @@ -1,5 +1,29 @@
   Changes with Apache 1.3b6
   
  +  *) For testing purposes, I added a new source called main/util_uri.c;
  + It contains a routine parse_uri_components_regex() and friends which
  + tries to break an URI into its parts. These parts are stored in a new
  + uri_components structure within each request_rec and are therefore
  + available to all routines which act on a request.
  + Additionally, an unparse routine is supplied which re-assembles the
  + URI components back to an URI, optionally hiding the username:password@
  + part from ftp proxy requests, and other useful routines.
  + Within the structure, you find on a ready-for-use basis:
  + scheme; /* scheme (http/ftp/...) */
  + hostinfo;   /* combined [user[:[EMAIL PROTECTED]:port] */
  + user;   /* user name, as in http://user:[EMAIL PROTECTED]:port/ */
  + password;   /* password, as in http://user:[EMAIL PROTECTED]:port/ */
  + hostname;   /* hostname from URI (or from Host: header) */
  + port_str;   /* port string (integer representation is in port) */
  + path;   /* the request path (or / if only scheme://host was 
given) */
  + query;  /* Everything after a '?' in the path, if present */
  + fragment;   /* Trailing #fragment string, if present */
  + plus flags to indicate whether the strings have valid values.
  + This is meant to serve as the platform for *BIG* savings in
  + code complexity for the proxy module (and maybe the vhost logic).
  + NOTE: This code is enabled only if the WITH_UTIL_URI define is set;
  + currently this is not enabled by default.  [Martin Kraemer]
  +
 *) Make all possible meta-construct expansions ($N, %N, %{NAME} and
${map:key}) available for all location where a string is created in
mod_rewrite rewriting rulesets: 1st arg of RewriteCond, 2nd arg of
  
  
  
  1.188 +7 -0  apache-1.3/src/include/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/httpd.h,v
  retrieving revision 1.187
  retrieving revision 1.188
  diff -u -u -r1.187 -r1.188
  --- httpd.h   1998/02/18 08:39:21 1.187
  +++ httpd.h   1998/02/27 15:15:15 1.188
  @@ -537,6 +537,10 @@
   typedef struct request_rec request_rec;
   typedef struct listen_rec listen_rec;
   
  +#ifdef WITH_UTIL_URI
  +#include util_uri.h
  +#endif
  +
   struct request_rec {
   
   pool *pool;
  @@ -656,6 +660,9 @@
   char *path_info;