cvs commit: apache-1.3/src/modules/proxy proxy_cache.c

1998-06-09 Thread martin
martin  98/06/09 14:17:55

  Modified:src/modules/proxy proxy_cache.c
  Log:
  Add casts for systems where sizeof(off_t) > sizeof(long).
  Sorry, but I see no other portable way to do it :-(
  Submitted by: Ralf Engelschall <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.43  +3 -3  apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -u -r1.42 -r1.43
  --- proxy_cache.c 1998/06/02 12:50:46 1.42
  +++ proxy_cache.c 1998/06/09 21:17:54 1.43
  @@ -331,7 +331,7 @@
   if (cmp_long61(&curbytes, &cachesize) < 0L) {
ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
 "proxy GC: Cache is %ld%% full (nothing deleted)",
  -  
((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space);
  +  
(long)((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space);
ap_unblock_alarms();
return;
   }
  @@ -362,7 +362,7 @@
   
   ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r->server,
 "proxy GC: Cache is %ld%% full (%d deleted)",
  -  
((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space, i);
  +  
(long)((curbytes.upper<<20)|(curbytes.lower>>10))*100/conf->space, i);
   ap_unblock_alarms();
   }
   
  @@ -594,7 +594,7 @@
q = ap_proxy_get_header(c->hdrs, "Content-Length");
if (q == NULL) {
strp = ap_palloc(p, 15);
  - ap_snprintf(strp, 15, "%lu", c->len);
  + ap_snprintf(strp, 15, "%lu", (unsigned long)c->len);
ap_proxy_add_header(c->hdrs, "Content-Length", strp, HDR_REP);
}
   }
  
  
  


cvs commit: apache-1.3 STATUS

1998-06-09 Thread coar
coar98/06/09 14:09:29

  Modified:.STATUS
  Log:
I'm -1 on the new method only because of the "usr/local/apache"
and no-source points.  It's not a veto, it's an "I don't like this"
vote.
  
  Revision  ChangesPath
  1.421 +6 -4  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.420
  retrieving revision 1.421
  diff -u -r1.420 -r1.421
  --- STATUS1998/06/09 15:50:03 1.420
  +++ STATUS1998/06/09 21:09:27 1.421
  @@ -160,7 +160,7 @@
  of PRs say they cannot find the httpd :-(
Pros: 
Cons: 
  - Status: Ralf -0
  + Status: Ralf -0, Ken +0
   
 2. The way other projects release binary tarballs, i.e.
a package containing the installed (binary) files.
  @@ -174,11 +174,13 @@
- packs the stuff together from ./apache-root only!!
Already known discussion points:
- should there be a prefix usr/local/apache in 
  -   the tarball or not because some people think
  -   its useful while others dislike it a lot.
  +   the tarball or not?  Some people think
  +   it's useful while others dislike it a lot.
  +  - it doesn't include the source.
  +  - should suexec be prebuilt in a binary tarball?
Pros: 
Cons: 
  - Status: Ralf +1, Martin +1
  + Status: Ralf +1, Martin +1, Ken -1 (not a veto)
   
   * Redefine APACHE_RELEASE. Add another 'bit' to signify whether
 it's a beta or final release. Maybe 'MMNNFFRBB' which means:
  
  
  


cvs commit: apache-1.3/src/support ab.c

1998-06-09 Thread martin
martin  98/06/09 14:02:14

  Modified:src/support ab.c
  Log:
  Fix typos from zb era
  
  Revision  ChangesPath
  1.8   +4 -4  apache-1.3/src/support/ab.c
  
  Index: ab.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/support/ab.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- ab.c  1998/04/21 20:14:05 1.7
  +++ ab.c  1998/06/09 21:02:13 1.8
  @@ -231,7 +231,7 @@
   printf("Document Path:  %s\n", path);
   printf("Document Length:%d bytes\n", doclen);
   printf("\n");
  -printf("Concurency Level:   %d\n", concurrency);
  +printf("Concurrency Level:  %d\n", concurrency);
   printf("Time taken for tests:   %d.%03d seconds\n",
  timetaken / 1000, timetaken % 1000);
   printf("Complete requests:  %d\n", done);
  @@ -241,12 +241,12 @@
  err_conn, err_length, err_except);
   if (keepalive)
   printf("Keep-Alive requests:%d\n", doneka);
  -printf("Total transfered:   %d bytes\n", totalread);
  -printf("HTML transfered:%d bytes\n", totalbread);
  +printf("Total transferred:  %d bytes\n", totalread);
  +printf("HTML transferred:   %d bytes\n", totalbread);
   
   /* avoid divide by zero */
   if (timetaken) {
  -printf("Requests per seconds:   %.2f\n", 1000 * (float) (done) / 
timetaken);
  +printf("Requests per second:%.2f\n", 1000 * (float) (done) / 
timetaken);
   printf("Transfer rate:  %.2f kb/s\n",
  (float) (totalread) / timetaken);
   }
  
  
  


cvs commit: apache-1.3 STATUS

1998-06-09 Thread rse
rse 98/06/09 08:50:07

  Modified:.STATUS
  Log:
  First cut to remember the binary tarball issue.
  I'll add pro and cons to both variants tomorrow for both better decision.
  
  Revision  ChangesPath
  1.420 +36 -0 apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.419
  retrieving revision 1.420
  diff -u -r1.419 -r1.420
  --- STATUS1998/06/09 14:23:50 1.419
  +++ STATUS1998/06/09 15:50:03 1.420
  @@ -144,6 +144,42 @@
   
   Open issues:
   
  +* How should an Apache binary release tarball look?
  +
  +  1. The "old" way where it is just a source release tarball
  + plus a pre-compiled src/httpd-. It is created
  + via the apache-devsite/binbuild.sh script which
  + - creates the build tree
  + - creates the src/Configuration file with standard modules
  + - runs "make"
  + - renames src/httpd to src/httpd-
  + - runs "make clean"
  + - packs the build tree stuff together
  + Already known discussion points:
  + - should src/httpd be renamed or now because a lot
  +   of PRs say they cannot find the httpd :-(
  + Pros: 
  + Cons: 
  + Status: Ralf -0
  +
  +  2. The way other projects release binary tarballs, i.e.
  + a package containing the installed (binary) files.
  + It can be created by a script which
  + - creates the build tree
  + - runs "./configure --prefix=/usr/local/apache \
  + --enable-shared=remain \
  + --disable-module=auth_db \
  + --enable-suexec ..."
  + - runs "make install root=apache-root"
  + - packs the stuff together from ./apache-root only!!
  + Already known discussion points:
  + - should there be a prefix usr/local/apache in 
  +   the tarball or not because some people think
  +   its useful while others dislike it a lot.
  + Pros: 
  + Cons: 
  + Status: Ralf +1, Martin +1
  +
   * Redefine APACHE_RELEASE. Add another 'bit' to signify whether
 it's a beta or final release. Maybe 'MMNNFFRBB' which means:
   MM: Major release #
  
  
  


cvs commit: apache-1.3 STATUS

1998-06-09 Thread jim
jim 98/06/09 07:23:51

  Modified:.STATUS
  Log:
  Let's try to get 1.2.1 out in a week-and-a-half
  
  Revision  ChangesPath
  1.419 +3 -1  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.418
  retrieving revision 1.419
  diff -u -r1.418 -r1.419
  --- STATUS1998/06/07 15:13:19 1.418
  +++ STATUS1998/06/09 14:23:50 1.419
  @@ -2,7 +2,9 @@
   
   Release:
   
  -1.3.1: In development
  +1.3.1: In development. Plan to release on June 19, 1998 to
  +   incorporate the latest additions plus WIN32 compile problems.
  +   Jim offers to be RM.
   
   1.3.0: Tagged and rolled on June 1. Announced and Released on the 6th.
  
  
  
  


cvs commit: apache-1.3/src CHANGES Configure

1998-06-09 Thread rse
rse 98/06/09 05:59:21

  Modified:src  CHANGES Configure
  Log:
  Make sure the DSO emulation code for HPUX finds the proprietary shl_xxx()
  functions which are in libdld under HPUX 9/10.
  
  PR: 2378
  
  Revision  ChangesPath
  1.904 +4 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.903
  retrieving revision 1.904
  diff -u -r1.903 -r1.904
  --- CHANGES   1998/06/09 11:00:19 1.903
  +++ CHANGES   1998/06/09 12:59:18 1.904
  @@ -1,4 +1,8 @@
   Changes with Apache 1.3.1
  +  
  +  *) Make sure the DSO emulation code for HPUX finds the proprietary 
shl_xxx()
  + functions which are in libdld under HPUX 9/10.
  + [Ralf S. Engelschall] PR#2378
   
 *) Make sure the "install" target of the top-level Makefile doesn't break
because of a return code of 1 from an "if" (for instance under braindead
  
  
  
  1.267 +9 -0  apache-1.3/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apache-1.3/src/Configure,v
  retrieving revision 1.266
  retrieving revision 1.267
  diff -u -r1.266 -r1.267
  --- Configure 1998/06/09 10:30:12 1.266
  +++ Configure 1998/06/09 12:59:19 1.267
  @@ -1071,6 +1071,15 @@
   *-ibm-aix* )
   DL_LIB="-lld"
   ;;
  +*-hp-hpux*)
  +if ./helpers/TestCompile func shl_load; then
  +:
  +else
  +if ./helpers/TestCompile lib dld; then
  +DL_LIB="-ldld"
  +fi
  +fi
  +;;
   * )
   if ./helpers/TestCompile func dlopen; then
   :
  
  
  


cvs commit: apache-1.3 Makefile.tmpl

1998-06-09 Thread rse
rse 98/06/09 04:02:20

  Modified:.Makefile.tmpl
  Log:
  Just cosmetics: Fix indentation.
  
  Revision  ChangesPath
  1.39  +5 -5  apache-1.3/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-1.3/Makefile.tmpl,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Makefile.tmpl 1998/06/09 11:00:18 1.38
  +++ Makefile.tmpl 1998/06/09 11:02:20 1.39
  @@ -424,11 +424,11 @@
   #   clean additional support stuff
   clean-support:
@echo "===> $(SRC)/support"; \
  - cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) clean; \
  - if [ ".$(suexec)" = .1 ]; then \
  - echo "$(RM) suexec"; \
  - $(RM) suexec; \
  - fi; \
  + cd $(TOP)/$(SRC)/support; $(MAKE) $(MFLAGS) clean; \
  + if [ ".$(suexec)" = .1 ]; then \
  + echo "$(RM) suexec"; \
  + $(RM) suexec; \
  + fi; \
echo "<=== $(SRC)/support"
   
   #   cleanup the source tree by removing anything which was
  
  
  


cvs commit: apache-1.3/src CHANGES

1998-06-09 Thread rse
rse 98/06/09 04:00:20

  Modified:.Makefile.tmpl
   src  CHANGES
  Log:
  Make sure the "install" target of the top-level Makefile doesn't break because
  of a return code of 1 from an "if" (for instance under braindead Ultrix the
  result code of an "if" construct is 1 if the "then" clause didn't match).
  
  Thanks to Ben Hyde for discovering this subtle problem.
  
  Revision  ChangesPath
  1.38  +3 -1  apache-1.3/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-1.3/Makefile.tmpl,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- Makefile.tmpl 1998/06/05 08:20:04 1.37
  +++ Makefile.tmpl 1998/06/09 11:00:18 1.38
  @@ -177,7 +177,9 @@
   #   separate parts of the installation process.
   install:
@if [ ! -f $(TOP)/$(SRC)/.apaci.build.ok ]; then \
  - $(MAKE) -f $(MKF) $(MFLAGS) $(MFWD) build; \
  + $(MAKE) -f $(MKF) $(MFLAGS) $(MFWD) build; \
  + else \
  + :; \
fi
@$(MAKE) -f $(MKF) $(MFLAGS) $(MFWD) \
install-mktree install-programs $(install-support) \
  
  
  
  1.903 +5 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.902
  retrieving revision 1.903
  diff -u -r1.902 -r1.903
  --- CHANGES   1998/06/09 10:30:11 1.902
  +++ CHANGES   1998/06/09 11:00:19 1.903
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.1
   
  +  *) Make sure the "install" target of the top-level Makefile doesn't break
  + because of a return code of 1 from an "if" (for instance under braindead
  + Ultrix the result code of an "if" construct is 1 if the "then" clause
  + didn't match). [Ralf S. Engelschall]
  +
 *) Add an additional "dummy" target to the "$(LIB)" target in generated
modules/xxx/Makefile's to avoid problems with SVR4 Make under "full-DSO"
situation (no libxxx.a built, only mod_xxx.so's) where LIB and OBJS are
  
  
  


cvs commit: apache-1.3/src CHANGES Configure

1998-06-09 Thread rse
rse 98/06/09 03:30:14

  Modified:src  CHANGES Configure
  Log:
  Add an additional "dummy" target to the "$(LIB)" target in generated
  modules/xxx/Makefile's to avoid problems with SVR4 Make under "full-DSO"
  situation (no libxxx.a built, only mod_xxx.so's) where LIB and OBJS are empty.
  
  Submitted by: Ralf S. Engelschall, Dean Gaudet, Martin Kraemer
  
  Revision  ChangesPath
  1.902 +5 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.901
  retrieving revision 1.902
  diff -u -r1.901 -r1.902
  --- CHANGES   1998/06/09 09:35:05 1.901
  +++ CHANGES   1998/06/09 10:30:11 1.902
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.1
   
  +  *) Add an additional "dummy" target to the "$(LIB)" target in generated
  + modules/xxx/Makefile's to avoid problems with SVR4 Make under "full-DSO"
  + situation (no libxxx.a built, only mod_xxx.so's) where LIB and OBJS are
  + empty. [Ralf S. Engelschall, Dean Gaudet, Martin Kraemer]
  +
 *) Replace two bad sprintf() calls with ap_snprintf() variants in
mod_rewrite. The sprintf()'s were incorrectly introduced recently 
because
Ralf didn't recognize that although the ap_psprintf() needs a pool 
(which
  
  
  
  1.266 +1 -1  apache-1.3/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apache-1.3/src/Configure,v
  retrieving revision 1.265
  retrieving revision 1.266
  diff -u -r1.265 -r1.266
  --- Configure 1998/06/08 18:06:43 1.265
  +++ Configure 1998/06/09 10:30:12 1.266
  @@ -1741,7 +1741,7 @@
   
   shlib:   $(SHLIBS)
   
  -$(LIB): $(OBJS)
  +dummy $(LIB): $(OBJS)
rm -f $@
ar cr $@ $(OBJS)
$(RANLIB) $@
  
  
  


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

1998-06-09 Thread rse
rse 98/06/09 02:35:08

  Modified:src  CHANGES
   src/modules/standard mod_rewrite.c
  Log:
  Replace two bad sprintf() calls with ap_snprintf() variants in mod_rewrite.
  The sprintf()'s were incorrectly introduced recently because Ralf didn't
  recognize that although the ap_psprintf() needs a pool (which is not available
  at the particular place in mod_rewrite) we also have the non-pool based more
  secure ap_snprintf() (which is now used).
  
  Thanks to Marc for complaining and giving the hint to ap_snprintf().
  
  Revision  ChangesPath
  1.901 +7 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.900
  retrieving revision 1.901
  diff -u -r1.900 -r1.901
  --- CHANGES   1998/06/09 05:22:10 1.900
  +++ CHANGES   1998/06/09 09:35:05 1.901
  @@ -1,5 +1,12 @@
   Changes with Apache 1.3.1
   
  +  *) Replace two bad sprintf() calls with ap_snprintf() variants in
  + mod_rewrite. The sprintf()'s were incorrectly introduced recently 
because
  + Ralf didn't recognize that although the ap_psprintf() needs a pool 
(which
  + is not available at the particular place in mod_rewrite) we also have 
the
  + non-pool based more secure ap_snprintf() (which is now used).
  + [Ralf S. Engelschall]
  +
 *) Fix missing usage description for MetaFiles directive.
[David MacKenzie <[EMAIL PROTECTED]>] PR#2384
   
  
  
  
  1.115 +3 -2  apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- mod_rewrite.c 1998/06/03 12:12:11 1.114
  +++ mod_rewrite.c 1998/06/09 09:35:07 1.115
  @@ -2820,7 +2820,8 @@
   char buf[50];
   
   rewrite_rand_init();
  -sprintf(buf, "%.0f", (((double)(rand()%RAND_MAX)/RAND_MAX)*(h-l)));
  +ap_snprintf(buf, sizeof(buf), "%.0f", 
  +(((double)(rand()%RAND_MAX)/RAND_MAX)*(h-l)));
   i = atoi(buf)+1;
   if (i < l) i = l;
   if (i > h) i = h;
  @@ -3194,7 +3195,7 @@
   STARTUPINFO si;
   PROCESS_INFORMATION pi;
   
  -sprintf(pCommand, "%s /C %s", SHELL_PATH, cmd);
  +ap_snprintf(pCommand, sizeof(pCommand), "%s /C %s", SHELL_PATH, cmd);
   
   memset(&si, 0, sizeof(si));
   memset(&pi, 0, sizeof(pi));
  
  
  


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

1998-06-09 Thread dgaudet
dgaudet 98/06/08 22:22:12

  Modified:src  CHANGES
   src/modules/standard mod_cern_meta.c
  Log:
  Missing usage for MetaFiles directive.
  
  PR:   2384
  Submitted by: David MacKenzie <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.900 +3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.899
  retrieving revision 1.900
  diff -u -r1.899 -r1.900
  --- CHANGES   1998/06/09 04:41:26 1.899
  +++ CHANGES   1998/06/09 05:22:10 1.900
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.1
   
  +  *) Fix missing usage description for MetaFiles directive.
  + [David MacKenzie <[EMAIL PROTECTED]>] PR#2384
  +
 *) mod_log_config wouldn't let vhosts use log formats defined in the
main server.  [Christof Damian <[EMAIL PROTECTED]>] PR#2090
   
  
  
  
  1.29  +2 -1  apache-1.3/src/modules/standard/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_cern_meta.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- mod_cern_meta.c   1998/04/11 12:00:45 1.28
  +++ mod_cern_meta.c   1998/06/09 05:22:11 1.29
  @@ -217,7 +217,8 @@
   
   static const command_rec cern_meta_cmds[] =
   {
  -{"MetaFiles", set_metafiles, NULL, DIR_CMD_PERMS, FLAG, NULL},
  +{"MetaFiles", set_metafiles, NULL, DIR_CMD_PERMS, FLAG,
  +"Limited to 'on' or 'off'"},
   {"MetaDir", set_metadir, NULL, DIR_CMD_PERMS, TAKE1,
"the name of the directory containing meta files"},
   {"MetaSuffix", set_metasuffix, NULL, DIR_CMD_PERMS, TAKE1,
  
  
  


cvs commit: apache-1.3/src CHANGES

1998-06-09 Thread dgaudet
dgaudet 98/06/08 21:41:28

  Modified:src  CHANGES
  Log:
  forgot PR#
  
  Revision  ChangesPath
  1.899 +1 -1  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.898
  retrieving revision 1.899
  diff -u -r1.898 -r1.899
  --- CHANGES   1998/06/09 04:36:44 1.898
  +++ CHANGES   1998/06/09 04:41:26 1.899
  @@ -1,7 +1,7 @@
   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]>]
  + main server.  [Christof Damian <[EMAIL PROTECTED]>] PR#2090
   
 *) mod_usertrack was corrupting the client hostname.  As part of the
fix, the cookie values were slightly extended to include the
  
  
  


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;