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

1999-08-03 Thread dgaudet
dgaudet 99/08/03 02:27:42

  Modified:src  CHANGES
   src/modules/standard mod_rewrite.c mod_rewrite.h
  Log:
   This patch includes fix for rewritelock in vhost problem and makes program
   map writes atomic if writev is available.
  
   -Dima
  
  PR:   3874
  Submitted by: Dmitry Khrustalev [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.1409+4 -1  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1408
  retrieving revision 1.1409
  diff -u -r1.1408 -r1.1409
  --- CHANGES   1999/08/02 10:48:11 1.1408
  +++ CHANGES   1999/08/03 09:27:25 1.1409
  @@ -1,6 +1,9 @@
   Changes with Apache 1.3.8
   
  -  *  Support for compaq/tandem/com.
  +  *) RewriteLock/RewriteMap didn't work properly with virtual hosts.
  + [Dmitry Khrustalev [EMAIL PROTECTED]] PR#3874
  +
  +  *) Support for compaq/tandem/com.
[Ottati, Michael [EMAIL PROTECTED], dirkx]
   
 *) Added SHA1 password encryption support to easy migration from 
  
  
  
  1.144 +35 -49apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.143
  retrieving revision 1.144
  diff -u -r1.143 -r1.144
  --- mod_rewrite.c 1999/07/29 17:54:06 1.143
  +++ mod_rewrite.c 1999/08/03 09:27:33 1.144
  @@ -91,6 +91,10 @@
   
   #include mod_rewrite.h
   
  +#ifndef NO_WRITEV
  +#include sys/types.h
  +#include sys/uio.h
  +#endif
   
   /*
   ** +---+
  @@ -208,6 +212,8 @@
   /* whether proxy module is available or not */
   static int proxy_available;
   
  +static char *lockname;
  +static int lockfd = -1;
   
   /*
   ** +---+
  @@ -234,8 +240,6 @@
   a-rewritelogfile  = NULL;
   a-rewritelogfp= -1;
   a-rewriteloglevel = 0;
  -a-rewritelockfile = NULL;
  -a-rewritelockfp   = -1;
   a-rewritemaps = ap_make_array(p, 2, sizeof(rewritemap_entry));
   a-rewriteconds= ap_make_array(p, 2, sizeof(rewritecond_entry));
   a-rewriterules= ap_make_array(p, 2, sizeof(rewriterule_entry));
  @@ -270,12 +274,6 @@
   a-rewritelogfp= overrides-rewritelogfp != -1 
? overrides-rewritelogfp 
: base-rewritelogfp;
  -a-rewritelockfile = overrides-rewritelockfile != NULL
  - ? overrides-rewritelockfile
  - : base-rewritelockfile;
  -a-rewritelockfp   = overrides-rewritelockfp != -1
  - ? overrides-rewritelockfp
  - : base-rewritelockfp;
   a-rewritemaps = ap_append_arrays(p, overrides-rewritemaps,
 base-rewritemaps);
   a-rewriteconds= ap_append_arrays(p, overrides-rewriteconds,
  @@ -291,8 +289,6 @@
   a-rewriteloglevel = overrides-rewriteloglevel;
   a-rewritelogfile  = overrides-rewritelogfile;
   a-rewritelogfp= overrides-rewritelogfp;
  -a-rewritelockfile = overrides-rewritelockfile;
  -a-rewritelockfp   = overrides-rewritelockfp;
   a-rewritemaps = overrides-rewritemaps;
   a-rewriteconds= overrides-rewriteconds;
   a-rewriterules= overrides-rewriterules;
  @@ -528,15 +524,12 @@
   
   static const char *cmd_rewritelock(cmd_parms *cmd, void *dconf, char *a1)
   {
  -rewrite_server_conf *sconf;
   const char *error;
   
   if ((error = ap_check_cmd_context(cmd, GLOBAL_ONLY)) != NULL)
   return error;
  -sconf = (rewrite_server_conf *)
  -ap_get_module_config(cmd-server-module_config, 
rewrite_module);
   
  -sconf-rewritelockfile = a1;
  +lockname = a1;
   
   return NULL;
   }
  @@ -2920,6 +2913,9 @@
   char buf[LONG_STRING_LEN];
   char c;
   int i;
  +#ifndef NO_WRITEV
  +struct iovec iov[2];
  +#endif
   
   /* when `RewriteEngine off' was used in the per-server
* context then the rewritemap-programs were not spawned.
  @@ -2934,8 +2930,16 @@
   rewritelock_alloc(r);
   
   /* write out the request key */
  +#ifdef NO_WRITEV
   write(fpin, key, strlen(key));
   write(fpin, \n, 1);
  +#else
  +iov[0].iov_base = key;
  +iov[0].iov_len = strlen(key);
  +iov[1].iov_base = \n;
  +iov[1].iov_len = 1;
  +writev(fpin, iov, 2);
  +#endif
   
   /* read in the response value */
   i = 0;
  @@ -3254,28 +3258,26 @@
   conf = ap_get_module_config(s-module_config, rewrite_module);
   
   /* only operate if a lockfile is used */
  -if (conf-rewritelockfile == 

cvs commit: apache-1.3 STATUS

1999-08-03 Thread coar
coar99/08/03 10:53:19

  Modified:.STATUS
  Log:
Add a note about the proposed 1.3.8 schedule, and some votes.
  
  Revision  ChangesPath
  1.732 +7 -6  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.731
  retrieving revision 1.732
  diff -u -r1.731 -r1.732
  --- STATUS1999/07/31 09:25:40 1.731
  +++ STATUS1999/08/03 17:53:18 1.732
  @@ -1,9 +1,12 @@
 1.3 STATUS:
  -  Last modified at [$Date: 1999/07/31 09:25:40 $]
  +  Last modified at [$Date: 1999/08/03 17:53:18 $]
   
   Release:
   
  -1.3.8-dev: current. 
  +1.3.8-dev: current.  'Quiet mode' on 6 August 1999, then internal
  +   testing until 12 August 1999.  If no problems, roll on
  +12 August and submit to -testers lists, then release on
  +Monday 16 August 1999.  Ken is RM.
   
   1.3.7: Not released.
   1.3.6. Tagged and rolled on Mar. 22. Released and announced on 24th.
  @@ -93,7 +96,7 @@
   
   * Stipe Tolj's Cygwin32 port
PR#: 2936
  -Status: Lars +1 (on concept), Martin +1 (on concept)
  +Status: Lars +1 (on concept), Martin +1 (on concept), Ken +1 
(concept)
   
   * Salvador Ortiz Garcia [EMAIL PROTECTED]' patch to allow 
DirectoryIndex
 to refer to URIs for non-static resources.
  @@ -117,7 +120,6 @@
 to either the server UID or the file's owner.
Message-ID: [EMAIL PROTECTED]
Status: Ken +1, Dean +1, Randy +1, Lars +0, Jim +1
  - (On hold until Aidan submits an update)
   
   * Keith Wannamaker's NT multiple services patch
Message-ID: [EMAIL PROTECTED]
  @@ -131,7 +133,7 @@
   
   * Jim Patterson's patch to make mod_info work on Win32
   Message-ID: PR#1442
  -Status: Lars +1 (on concept)
  +Status: Lars +1 (on concept), Ken +1 (concept)
   
   * Peter Greis' new '%m' CustomLog option: the time taken to serve the
 request, in milli-seconds.
  @@ -166,7 +168,6 @@
   Message-ID: [EMAIL PROTECTED]
   Message-ID: [EMAIL PROTECTED]
   Status: Greg +1, Martin +1 (on concept)
  -
   
   In progress:
   
  
  
  


cvs commit: apache-2.0/mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c

1999-08-03 Thread manoj
manoj   99/08/03 11:17:54

  Modified:mpm/src/modules/mpm/dexter dexter.c
   mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c
  Log:
  Update with new hooks.
  
  Revision  ChangesPath
  1.12  +0 -2  apache-2.0/mpm/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -d -u -r1.11 -r1.12
  --- dexter.c  1999/07/29 20:06:19 1.11
  +++ dexter.c  1999/08/03 18:17:48 1.12
  @@ -1691,8 +1691,6 @@
   
   module MODULE_VAR_EXPORT mpm_dexter_module = {
   STANDARD20_MODULE_STUFF,
  -NULL,   /* post_config */
  -NULL,/* open_logs */
   NULL,/* child_init */
   NULL,/* create per-directory config structure */
   NULL,/* merge per-directory config structures */
  
  
  
  1.18  +0 -2  
apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===
  RCS file: 
/home/cvs/apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -d -u -r1.17 -r1.18
  --- mpmt_pthread.c1999/07/29 20:43:28 1.17
  +++ mpmt_pthread.c1999/08/03 18:17:51 1.18
  @@ -1763,8 +1763,6 @@
   
   module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = {
   STANDARD20_MODULE_STUFF,
  -NULL,   /* post_config */
  -NULL,/* open_logs */
   NULL,/* child_init */
   NULL,/* create per-directory config structure */
   NULL,/* merge per-directory config structures */
  
  
  


cvs commit: apache-1.3 STATUS

1999-08-03 Thread coar
coar99/08/03 12:26:56

  Modified:.STATUS
  Log:
Add Sequent update patch.
  
  Revision  ChangesPath
  1.733 +5 -1  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.732
  retrieving revision 1.733
  diff -u -r1.732 -r1.733
  --- STATUS1999/08/03 17:53:18 1.732
  +++ STATUS1999/08/03 19:26:54 1.733
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 1999/08/03 17:53:18 $]
  +  Last modified at [$Date: 1999/08/03 19:26:54 $]
   
   Release:
   
  @@ -93,6 +93,10 @@
   
   
   Available Patches:
  +
  +* Ian Turner's patch for port to Sequent (enabling DSO)
  + PR: 4735
  + Status: 
   
   * Stipe Tolj's Cygwin32 port
PR#: 2936
  
  
  


cvs commit: apache-2.0/mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c

1999-08-03 Thread manoj
manoj   99/08/03 13:03:10

  Modified:mpm/src/modules/mpm/dexter dexter.c
   mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c
  Log:
  get rid of the vestigial ap_open_logs call (and the ap_clear_pool that
  went along with it), to fix logging problems. Sometimes the bug would
  show up as a segfault, and sometimes as logging to an incorrect file.
  
  Revision  ChangesPath
  1.13  +0 -2  apache-2.0/mpm/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -d -u -r1.12 -r1.13
  --- dexter.c  1999/08/03 18:17:48 1.12
  +++ dexter.c  1999/08/03 20:03:07 1.13
  @@ -1333,8 +1333,6 @@
   no listening sockets available, shutting down);
   return 1;
   }
  -ap_clear_pool(plog);
  -ap_open_logs(server_conf, plog);
   ap_log_pid(pconf, ap_pid_fname);
   SAFE_ACCEPT(accept_mutex_init(pconf, 1));
   if (!is_graceful) {
  
  
  
  1.19  +0 -2  
apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===
  RCS file: 
/home/cvs/apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -d -u -r1.18 -r1.19
  --- mpmt_pthread.c1999/08/03 18:17:51 1.18
  +++ mpmt_pthread.c1999/08/03 20:03:09 1.19
  @@ -1377,8 +1377,6 @@
   no listening sockets available, shutting down);
   return 1;
   }
  -ap_clear_pool(plog);
  -ap_open_logs(server_conf, plog);
   ap_log_pid(pconf, ap_pid_fname);
   SAFE_ACCEPT(accept_mutex_init(pconf, 1));
   if (!is_graceful) {
  
  
  


cvs commit: apache-2.0/mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c

1999-08-03 Thread manoj
manoj   99/08/03 13:41:38

  Modified:mpm/src/modules/mpm/dexter dexter.c
   mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c
  Log:
  No reason to have a loop writing one byte at a time to the pipe of death
  when the write call will do it for us. Also fix the comments a bit.
  
  Revision  ChangesPath
  1.14  +3 -5  apache-2.0/mpm/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -d -u -r1.13 -r1.14
  --- dexter.c  1999/08/03 20:03:07 1.13
  +++ dexter.c  1999/08/03 20:41:36 1.14
  @@ -1419,11 +1419,9 @@
ap_scoreboard_image[i].status = SERVER_DYING;
} 
}
  - /* kill off the idle ones */
  -for (i = 0; i  num_daemons; ++i) {
  -if (write(pipe_of_death[1], char_of_death, 1) == -1) {
  -ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, write 
pipe_of_death);
  -}
  + /* give the children the signal to die */
  +if (write(pipe_of_death[1], char_of_death, num_daemons) == -1) {
  +ap_log_error(APLOG_MARK, APLOG_ERR, server_conf, write 
pipe_of_death);
   }
   }
   else {
  
  
  
  1.20  +5 -5  
apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===
  RCS file: 
/home/cvs/apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -d -u -r1.19 -r1.20
  --- mpmt_pthread.c1999/08/03 20:03:09 1.19
  +++ mpmt_pthread.c1999/08/03 20:41:37 1.20
  @@ -1469,11 +1469,11 @@
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf,
SIGWINCH received.  Doing graceful restart);
   
  - /* kill off the idle ones */
  -for (i = 0; i  ap_daemons_limit; ++i) {
  -if (write(pipe_of_death[1], char_of_death, 1) == -1) {
  -ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, write 
pipe_of_death);
  -}
  +/* give the children the signal to die. Sending more bytes than
  + * children is okay, because the pipe is recreated for every
  + * generation */
  +if (write(pipe_of_death[1], char_of_death, ap_daemons_limit) == -1) 
{
  +ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, write 
pipe_of_death);
   }
   
/* This is mostly for debugging... so that we know what is still