cvs commit: apachen/src/main http_main.c

1997-10-15 Thread dgaudet
dgaudet 97/10/14 17:14:33

  Modified:src/main http_main.c
  Log:
  clear_pool() was called before copy_listeners, and copy_listeners was using
  pointers from the cleared pool.
  
  close(scoreboard_fd) was happening before the scoreboard was even opened.
  
  Reviewed by:  Jim Jagielski, Rob Hartill
  
  Revision  ChangesPath
  1.235 +2 -3  apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.234
  retrieving revision 1.235
  diff -u -r1.234 -r1.235
  --- http_main.c   1997/10/07 19:34:01 1.234
  +++ http_main.c   1997/10/15 00:14:31 1.235
  @@ -1406,7 +1406,7 @@
   #else
   #define SCOREBOARD_FILE
   static scoreboard _scoreboard_image;
  -static int scoreboard_fd;
  +static int scoreboard_fd = -1;
   
   /* XXX: things are seriously screwed if we ever have to do a partial
* read or write ... we could get a corrupted scoreboard
  @@ -3122,7 +3122,7 @@
restart_time = time(NULL);
}
   #ifdef SCOREBOARD_FILE
  - else {
  + else if (scoreboard_fd != -1) {
kill_cleanups_for_fd(pconf, scoreboard_fd);
}
   #endif
  @@ -3392,7 +3392,6 @@
   init_modules(pconf, server_conf);
   
   if (standalone) {
  - clear_pool(pconf);  /* standalone_main rereads... */
STANDALONE_MAIN(argc, argv);
   }
   else {
  
  
  


cvs commit: apachen/src/main http_request.c

1997-10-15 Thread dgaudet
dgaudet 97/10/14 17:15:14

  Modified:src/main http_request.c
  Log:
  Fix an off-by-one error introduced in one of the directory_walk optimizations.
  
  Reviewed by:  Jim Jagielski, Rob Hartill
  
  Revision  ChangesPath
  1.89  +3 -1  apachen/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_request.c,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- http_request.c1997/10/07 05:27:08 1.88
  +++ http_request.c1997/10/15 00:15:13 1.89
  @@ -364,8 +364,10 @@
* We will use test_dirname as scratch space while we build directory
* names during the walk.  Profiling shows directory_walk to be a busy
* function so we try to avoid allocating lots of extra memory here.
  + * We need 2 extra bytes, one for trailing \0 and one because
  + * make_dirstr_prefix will add potentially one extra /.
*/
  -test_dirname = palloc(r-pool, test_filename_len + 1);
  +test_dirname = palloc(r-pool, test_filename_len + 2);
   
   /* j keeps track of which section we're on, see core_reorder_directories 
*/
   j = 0;
  
  
  


cvs commit: apachen/src/main alloc.c

1997-10-15 Thread dgaudet
dgaudet 97/10/14 17:19:36

  Modified:src/main alloc.c
  Log:
  Add in alloc debugging code which can be used standalone to detect some
  uninitialized read, and use-after-free errors.  It can also be combined with
  debuggers like efence and Purify.  By default nothing should change.
  
  This change introduces one change to the non-debugging code:
  
  -blok = new_block(0);
  +blok = new_block(POOL_HDR_BYTES);
  
  This is during make_sub_pool.  Technically speaking, this fixes a bug;
  the bug was that make_sub_pool was assuming that
  BLOCK_MINALLOC  POOL_HDR_BYTES.  Not an unreasonable assumption ... but
  the debugging code sets BLOCK_MINALLOC to 0.
  
  Reviewed by:  Jim Jagielski, Rob Hartill, Martin Kraemer
  
  Revision  ChangesPath
  1.50  +109 -5apachen/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/alloc.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- alloc.c   1997/10/05 02:06:36 1.49
  +++ alloc.c   1997/10/15 00:19:35 1.50
  @@ -63,6 +63,37 @@
   
   #include stdarg.h
   
  +/* debugging support, define this to enable code which helps detect re-use
  + * of freed memory and other such nonsense.
  + *
  + * The theory is simple.  The FILL_BYTE (0xa5) is written over all malloc'd
  + * memory as we receive it, and is written over everything that we free up
  + * during a clear_pool.  We check that blocks on the free list always
  + * have the FILL_BYTE in them, and we check during palloc() that the bytes
  + * still have FILL_BYTE in them.  If you ever see garbage URLs or whatnot
  + * containing lots of 0xa5s then you know something used data that's been
  + * freed.
  + */
  +/* #define ALLOC_DEBUG */
  +
  +/* debugging support, if defined all allocations will be done with
  + * malloc and free()d appropriately at the end.  This is intended to be
  + * used with something like Electric Fence or Purify to help detect
  + * memory problems.  Note that if you're using efence then you should also
  + * add in ALLOC_DEBUG.  But don't add in ALLOC_DEBUG if you're using Purify
  + * because ALLOC_DEBUG would hide all the uninitialized read errors that
  + * Purify can diagnose.
  + */
  +/* #define ALLOC_USE_MALLOC */
  +
  +#ifdef ALLOC_USE_MALLOC
  +#undef BLOCK_MINFREE
  +#undef BLOCK_MINALLOC
  +#define BLOCK_MINFREE0
  +#define BLOCK_MINALLOC   0
  +#endif
  +
  +
   /*
*
* Managing free storage blocks...
  @@ -98,6 +129,28 @@
   mutex *alloc_mutex = NULL;
   mutex *spawn_mutex = NULL;
   
  +#ifdef ALLOC_DEBUG
  +#define FILL_BYTE((char)(0xa5))
  +
  +#define debug_fill(ptr,size) ((void)memset((ptr), FILL_BYTE, (size)))
  +
  +static ap_inline void debug_verify_filled(const char *ptr,
  +const char *endp, const char *error_msg)
  +{
  +for (; ptr  endp; ++ptr) {
  + if (*ptr != FILL_BYTE) {
  + fputs(error_msg, stderr);
  + abort();
  + exit(1);
  + }
  +}
  +}
  +
  +#else
  +#define debug_fill(a,b)
  +#define debug_verify_filled(a,b,c)
  +#endif
  +
   
   /* Get a completely new block from the system pool. Note that we rely on
  malloc() to provide aligned memory. */
  @@ -111,6 +164,7 @@
fprintf(stderr, Ouch!  malloc failed in malloc_block()\n);
exit(1);
   }
  +debug_fill(blok, size + sizeof(union block_hdr));
   blok-h.next = NULL;
   blok-h.first_avail = (char *) (blok + 1);
   blok-h.endp = size + blok-h.first_avail;
  @@ -138,6 +192,14 @@
   
   void free_blocks(union block_hdr *blok)
   {
  +#ifdef ALLOC_USE_MALLOC
  +union block_hdr *next;
  +
  +for (; blok; blok = next) {
  + next = blok-h.next;
  + free(blok);
  +}
  +#else
   /* First, put new blocks at the head of the free list ---
* we'll eventually bash the 'next' pointer of the last block
* in the chain to point to the free blocks we already had.
  @@ -161,21 +223,22 @@
   while (blok-h.next != NULL) {
chk_on_blk_list(blok, old_free_list);
blok-h.first_avail = (char *) (blok + 1);
  + debug_fill(blok-h.first_avail, blok-h.endp - blok-h.first_avail);
blok = blok-h.next;
   }
   
   chk_on_blk_list(blok, old_free_list);
   blok-h.first_avail = (char *) (blok + 1);
  +debug_fill(blok-h.first_avail, blok-h.endp - blok-h.first_avail);
   
   /* Finally, reset next pointer to get the old free blocks back */
   
   blok-h.next = old_free_list;
   (void) release_mutex(alloc_mutex);
  +#endif
   }
   
   
  -
  -
   /* Get a new block, from our own free list if possible, from the system
* if necessary.  Must be called with alarms blocked.
*/
  @@ -193,6 +256,8 @@
if (min_size + BLOCK_MINFREE = blok-h.endp - blok-h.first_avail) {
*lastptr = blok-h.next

cvs commit: apachen/src CHANGES

1997-10-15 Thread dgaudet
dgaudet 97/10/14 17:24:06

  Modified:htdocs/manual new_features_1_3.html
   src  CHANGES
  Log:
  Document alloc debugging.
  
  Revision  ChangesPath
  1.27  +10 -0 apachen/htdocs/manual/new_features_1_3.html
  
  Index: new_features_1_3.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/new_features_1_3.html,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- new_features_1_3.html 1997/10/07 19:44:36 1.26
  +++ new_features_1_3.html 1997/10/15 00:24:01 1.27
  @@ -395,6 +395,16 @@
   An option to codespawn_child/code functions which prevents Apache
   from aggressively trying to kill off the child.
   
  +listrongcodealloc debugging code/code/strongbr
  +Defining codeALLOC_DEBUG/code provides a rudimentary memory
  +debugger which can be used on live servers with low impact --
  +it sets all allocated and freed memory bytes to 0xa5.  Defining
  +codeALLOC_USE_MALLOC/code will cause the alloc code to use
  +codemalloc()/code and codefree()/code for each object.  This
  +is far more expensive and should only be used for testing with tools
  +such as Electric Fence and Purify.  See codemain/alloc.c/code
  +for more details.
  +
   /ul
   
   /ul
  
  
  
  1.463 +8 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.462
  retrieving revision 1.463
  diff -u -r1.462 -r1.463
  --- CHANGES   1997/10/07 20:04:58 1.462
  +++ CHANGES   1997/10/15 00:24:03 1.463
  @@ -1,5 +1,13 @@
   Changes with Apache 1.3b1
   
  +  *) Add debugging code to alloc.c.  Defining ALLOC_DEBUG provides a
  + rudimentary memory debugger which can be used on live servers with
  + low impact -- it sets all allocated and freed memory bytes to 0xa5.
  + Defining ALLOC_USE_MALLOC will cause the alloc code to use malloc()
  + and free() for each object.  This is far more expensive and should
  + only be used for testing with tools such as Electric Fence and
  + Purify.  See main/alloc.c for more details.  [Dean Gaudet]
  +
 *) Configure uses a sh trap and didn't set its exitcode properly.
[Dean Gaudet] PR#1159
   
  
  
  


cvs commit: apache/src Configuration.tmpl

1997-10-22 Thread dgaudet
dgaudet 97/10/21 17:18:44

  Modified:src  Tag: APACHE_1_2_X Configuration.tmpl
  Log:
  PR#1279: Documentation sucks.  Modules are listed in reverse priority order,
  not priority order.  (already fixed in 1.3)
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.63.2.1  +2 -2  apache/src/Configuration.tmpl
  
  Index: Configuration.tmpl
  ===
  RCS file: /export/home/cvs/apache/src/Configuration.tmpl,v
  retrieving revision 1.63
  retrieving revision 1.63.2.1
  diff -u -r1.63 -r1.63.2.1
  --- Configuration.tmpl1997/05/10 17:14:36 1.63
  +++ Configuration.tmpl1997/10/22 00:18:43 1.63.2.1
  @@ -18,8 +18,8 @@
   # control Configure's behavior as far as how to create Makefile.
   #
   # Module selection lines, distinguished by having 'Module' at the front.
  -# These list the configured modules, in priority order (highest priority
  -# first).  They're down at the bottom.
  +# These list the configured modules, in reverse priority order (lowest
  +# priority first).  They're down at the bottom.
   #
   # Optional module selection lines, distinguished by having `%Module'
   # at the front.  These specify a module that is to be compiled in (but
  
  
  


cvs commit: apachen/src/main http_main.c

1997-10-22 Thread dgaudet
dgaudet 97/10/22 09:43:06

  Modified:src/main http_main.c
  Log:
  indent screwed up the indentation a bit
  
  Revision  ChangesPath
  1.236 +2 -2  apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.235
  retrieving revision 1.236
  diff -u -r1.235 -r1.236
  --- http_main.c   1997/10/15 00:14:31 1.235
  +++ http_main.c   1997/10/22 16:43:05 1.236
  @@ -3005,7 +3005,7 @@
 */
case SERVER_STARTING:
case SERVER_READY:
  - ++ idle_count;
  + ++ idle_count;
/* always kill the highest numbered child if we have to...
 * no really well thought out reason ... other than observing
 * the server behaviour under linux where lower numbered children
  @@ -3016,7 +3016,7 @@
break;
case SERVER_DEAD:
/* try to keep children numbers as low as possible */
  - if (free_length  idle_spawn_rate) {
  + if (free_length  idle_spawn_rate) {
free_slots[free_length] = i;
++free_length;
}
  
  
  


cvs commit: apachen/src/modules/standard mod_speling.c

1997-10-22 Thread dgaudet
dgaudet 97/10/22 09:57:36

  Modified:src/modules/standard mod_speling.c
  Log:
  Fix some 64-bit warnings.
  
  Reviewed by:  Dean Gaudet, Martin Kraemer, Jim Jagielski
  
  Revision  ChangesPath
  1.7   +4 -3  apachen/src/modules/standard/mod_speling.c
  
  Index: mod_speling.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_speling.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_speling.c 1997/10/20 13:28:02 1.6
  +++ mod_speling.c 1997/10/22 16:57:34 1.7
  @@ -91,11 +91,12 @@
   {
   void *server_conf = cmd-server-module_config;
   
  -set_module_config(server_conf, speling_module, (void *) arg);
  +/* any non-NULL pointer means speling is enabled */
  +set_module_config(server_conf, speling_module, arg ? (void 
*)speling_module : NULL);
   return NULL;
   }
   
  -command_rec speling_cmds[] =
  +static command_rec speling_cmds[] =
   {
   {CheckSpelling, set_speling, NULL, RSRC_CONF, FLAG,
   whether or not to fix miscapitalized/misspelled requests},
  @@ -183,7 +184,7 @@
   struct DIR_TYPE *dir_entry;
   array_header *candidates = NULL;
   
  -if (!(int) get_module_config(server_conf, speling_module))
  +if (!get_module_config(server_conf, speling_module))
   return DECLINED;
   
   /* We only want to worry about GETs */
  
  
  


cvs commit: apachen/src/modules/standard mod_autoindex.c mod_dir.c

1997-10-22 Thread dgaudet
dgaudet 97/10/22 09:59:24

  Modified:src/modules/standard mod_autoindex.c mod_dir.c
  Log:
  When method is not GET, just DECLINE rather than return NOT_IMPLEMENTED.
  
  PR:   1241
  Reviewed by:  Dean Gaudet, Jim Jagielski, Martin Kraemer
  
  Revision  ChangesPath
  1.52  +1 -1  apachen/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- mod_autoindex.c   1997/10/16 18:55:51 1.51
  +++ mod_autoindex.c   1997/10/22 16:59:22 1.52
  @@ -1104,7 +1104,7 @@
   int allow_opts = allow_options(r);
   
   if (r-method_number != M_GET)
  - return NOT_IMPLEMENTED;
  + return DECLINED;
   
   /* OK, nothing easy.  Trot out the heavy artillery... */
   
  
  
  
  1.42  +1 -1  apachen/src/modules/standard/mod_dir.c
  
  Index: mod_dir.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_dir.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- mod_dir.c 1997/09/18 18:40:51 1.41
  +++ mod_dir.c 1997/10/22 16:59:23 1.42
  @@ -182,7 +182,7 @@
   return error_notfound;
   
   if (r-method_number != M_GET)
  -return NOT_IMPLEMENTED;
  +return DECLINED;
   
   /* nothing for us to do, pass on through */
   
  
  
  


cvs commit: apachen/src/main http_core.c

1997-10-22 Thread dgaudet
dgaudet 97/10/22 10:08:49

  Modified:src/main http_core.c
  Log:
  Tweak the descriptions a bit.
  
  Revision  ChangesPath
  1.130 +2 -2  apachen/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.129
  retrieving revision 1.130
  diff -u -r1.129 -r1.130
  --- http_core.c   1997/10/21 21:45:12 1.129
  +++ http_core.c   1997/10/22 17:08:47 1.130
  @@ -1485,7 +1485,7 @@
   { /Directory, end_dirsection, NULL, ACCESS_CONF, NO_ARGS, Marks end of 
Directory },
   { Location, urlsection, NULL, RSRC_CONF, RAW_ARGS, Container for 
directives affecting resources accessed through the specified URL paths },
   { /Location, end_urlsection, NULL, ACCESS_CONF, NO_ARGS, Marks end of 
Location },
  -{ VirtualHost, virtualhost_section, NULL, RSRC_CONF, RAW_ARGS, Container 
to map directives to a particular virtual host },
  +{ VirtualHost, virtualhost_section, NULL, RSRC_CONF, RAW_ARGS, Container 
to map directives to a particular virtual host, takes one or more host 
addresses },
   { /VirtualHost, end_virtualhost_section, NULL, RSRC_CONF, NO_ARGS, 
Marks end of Directory },
   { Files, filesection, NULL, OR_ALL, RAW_ARGS, Container for directives 
affecting files matching specified patterns },
   { /Files, end_filesection, NULL, OR_ALL, NO_ARGS, Marks end of Files 
},
  @@ -1601,7 +1601,7 @@
   { Include, include_config, NULL, RSRC_CONF, TAKE1, config file to be 
included },
   { LogLevel, set_loglevel, NULL, RSRC_CONF, TAKE1, set level of verbosity 
in error logging },
   { NameVirtualHost, set_name_virtual_host, NULL, RSRC_CONF, TAKE1,
  -  a numeric ip address:port, or the name of a host with a single address },
  +  a numeric ip address:port, or the name of a host },
   { NULL },
   };
   
  
  
  


cvs commit: apachen/src/modules/standard mod_unique_id.c

1997-10-24 Thread dgaudet
dgaudet 97/10/24 01:56:48

  Modified:src/modules/standard mod_unique_id.c
  Log:
  I'm in the middle of documenting the algorithm used here... I found another
  problem to defend against.
  
  Revision  ChangesPath
  1.7   +4 -1  apachen/src/modules/standard/mod_unique_id.c
  
  Index: mod_unique_id.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_unique_id.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_unique_id.c   1997/10/22 20:30:30 1.6
  +++ mod_unique_id.c   1997/10/24 08:56:46 1.7
  @@ -245,7 +245,10 @@
   cur_unique_id.counter = 0;
   }
   else {
  -cur_unique_id.counter = tv.tv_usec;
  + /* Some systems have very low variance on the low end of their
  +  * system counter, defend against that.
  +  */
  +cur_unique_id.counter = tv.tv_usec / 10;
   }
   #else
   cur_unique_id.counter = 0;
  
  
  


cvs commit: apachen/htdocs/manual/mod mod_unique_id.html index.html

1997-10-24 Thread dgaudet
dgaudet 97/10/24 02:34:22

  Modified:htdocs/manual/mod index.html
  Added:   htdocs/manual/mod mod_unique_id.html
  Log:
  Document mod_unique_id.html.
  
  Revision  ChangesPath
  1.21  +1 -1  apachen/htdocs/manual/mod/index.html
  
  Index: index.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/mod/index.html,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- index.html1997/09/12 09:36:18 1.20
  +++ index.html1997/10/24 09:34:21 1.21
  @@ -107,7 +107,7 @@
   ddServer status display
   dtA HREF=mod_userdir.htmlmod_userdir/A
   ddUser home directories.
  -dtxA HREF=mod_unique_id.htmlmod_unique_id/A Apache 1.3 and up
  +dtA HREF=mod_unique_id.htmlmod_unique_id/A Apache 1.3 and up
   ddGenerate unique request identifier for every request
   dtA HREF=mod_usertrack.htmlmod_usertrack/A Apache 1.2 and up
   ddUser tracking using Cookies (replacement for mod_cookies.c)
  
  
  
  1.1  apachen/htdocs/manual/mod/mod_unique_id.html
  
  Index: mod_unique_id.html
  ===
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN
  HTML
  HEAD
  TITLEApache module mod_unique_id/TITLE
  /HEAD
  
  !-- Background white, links blue (unvisited), navy (visited), red (active) 
--
  BODY
   BGCOLOR=#FF
   TEXT=#00
   LINK=#FF
   VLINK=#80
   ALINK=#FF
  
  !--#include virtual=header.html --
  H1 ALIGN=CENTERModule mod_unique_id/h1
  
  This module provides a magic token for each request which is guaranteed
  to be unique across all requests under very specific conditions.
  The unique identifier is even unique across multiple machines in a
  properly configured cluster of machines.  The environment variable
  codeUNIQUE_ID/code is set to the identifier for each request.
  Unique identifiers are useful for various reasons which are beyond the
  scope of this document.
  
  h2Theory/h2
  
  p
  First a brief recap of how the Apache server works on Unix machines.
  This feature currently isn't supported on Windows NT.  On Unix machines,
  Apache creates several children, the children process requests one at
  a time.  Each child can serve multiple requests in its lifetime.  For the
  purpose of this discussion, the children don't share any data
  with each other.  We'll refer to the children as httpd processes.
  
  p
  Your website has one or more machines under your administrative control,
  together we'll call them a cluster of machines.  Each machine can
  possibly run multiple instances of Apache.  All of these collectively
  are considered the universe, and with certain assumptions we'll
  show that in this universe we can generate unique identifiers for each
  request, without extensive communication between machines in the cluster.
  
  p
  The machines in your cluster should satisfy these requirements.
  (Even if you have only one machine you should synchronize its clock
  with NTP.)
  
  ul
  liThe machines' times are synchronized via NTP or other network time
  protocol.
  
  liThe machines' hostnames all differ, such that the module can do a
  hostname lookup on the hostname and receive a different IP address
  for each machine in the cluster.
  /ul
  
  p
  As far as operating system assumptions go, we assume that pids (process
  ids) fit in 32-bits.  If the operating system uses more than 32-bits
  for a pid, the fix is trivial but must be performed in the code.
  
  p
  Given those assumptions, at a single point in time we can identify
  any httpd process on any machine in the cluster from all other httpd
  processes.  The machine's IP address and the pid of the httpd process
  are sufficient to do this.  So in order to generate unique identifiers
  for requests we need only distinguish between different points in time.
  
  p
  To distinguish time we will use a Unix timestamp (seconds since January
  1, 1970 UTC), and a 16-bit counter.  The timestamp has only one second
  granularity, so the counter is used to represent up to 65536 values
  during a single second.  The quadruple i( ip_addr, pid, time_stamp,
  counter )/i is sufficient to enumerate 65536 requests per second per
  httpd process.  There are issues however with pid reuse over
  time, and the counter is used to alleviate this issue.
  
  p
  When an httpd child is created, the counter is initialized with (
  current microseconds divided by 10 ) modulo 65536 (this formula was
  chosen to eliminate some variance problems with the low order bits of
  the microsecond timers on some systems).  When a unique identifier is
  generated, the time stamp used is the time the request arrived at the
  web server.  The counter is incremented every time an identifier is
  generated (and allowed to roll over).
  
  p
  The kernel generates a pid for each process as it forks the process, and
  pids

cvs commit: apachen/htdocs/manual/misc perf-tuning.html

1997-10-24 Thread dgaudet
dgaudet 97/10/24 02:39:19

  Modified:htdocs/manual/misc perf-tuning.html
  Log:
  document MMAP_SEGMENT_SIZE
  
  Revision  ChangesPath
  1.2   +16 -9 apachen/htdocs/manual/misc/perf-tuning.html
  
  Index: perf-tuning.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/misc/perf-tuning.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- perf-tuning.html  1997/09/30 23:24:30 1.1
  +++ perf-tuning.html  1997/10/24 09:39:17 1.2
  @@ -690,16 +690,23 @@
   
   On some architectures it's slower to codemmap/code small
   files than it is to simply coderead/code them.  The define
  -codeMMAP_THRESHOLD/code can be set to the minimum size required before
  -using codemmap/code.  By default it's set to 0 (except on SunOS4
  -where experimentation has shown 8192 to be a better value).  Using a
  -tool such as
  -a href=http://reality.sgi.com/lm_engr/lmbench/lmbench.html;lmbench/a
  -you can determine the optimal setting for your
  -environment.  It may even be the case that codemmap/code isn't used
  -on your architecture, if so then defining codeUSE_MMAP_FILES/code
  -might work (if it works then report back to us).
  +codeMMAP_THRESHOLD/code can be set to the minimum
  +size required before using codemmap/code.  By default
  +it's set to 0 (except on SunOS4 where experimentation has
  +shown 8192 to be a better value).  Using a tool such as a
  +href=http://reality.sgi.com/lm_engr/lmbench/lmbench.html;lmbench/a you
  +can determine the optimal setting for your environment.
  +
  +pYou may also wish to experiment with codeMMAP_SEGMENT_SIZE/code
  +(default 32768) which determines the maximum number of bytes that
  +will be written at a time from mmap()d files.  Apache only resets the
  +client's codeTimeout/code in between write()s.  So setting this
  +large may lock out low bandwidth clients unless you also increase the
  +codeTimeout/code.
   
  +pIt may even be the case that codemmap/code isn't
  +used on your architecture, if so then defining codeUSE_MMAP_FILES/code
  +might work (if it works then report back to us).
   
   pApache does its best to avoid copying bytes around in memory.  The
   first write of any request typically is turned into a codewritev/code
  
  
  


cvs commit: apachen/htdocs/manual new_features_1_3.html

1997-10-24 Thread dgaudet
dgaudet 97/10/24 02:44:18

  Modified:htdocs/manual new_features_1_3.html
  Log:
  update with mod_unique_id link
  
  Revision  ChangesPath
  1.29  +4 -5  apachen/htdocs/manual/new_features_1_3.html
  
  Index: new_features_1_3.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/new_features_1_3.html,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- new_features_1_3.html 1997/10/20 16:27:47 1.28
  +++ new_features_1_3.html 1997/10/24 09:44:17 1.29
  @@ -275,11 +275,10 @@
   documentation/a for more information.
   
   listrongUnique Identifiers/strongbr
  -mod_unique_id can be included to generate a unique identifier that
  -distinguishes a hit from every other hit.  (Unique has
  -some restrictions on it.)  Documentation to be written.  The
  -identifier is available in the environment variable
  -codeUNIQUE_ID/code.
  +a href=mod/mod_unique_id.htmlmod_unique_id/a can be included
  +to generate a unique identifier that distinguishes a hit from every
  +other hit.  (Unique has some restrictions on it.)  The identifier
  +is available in the environment variable codeUNIQUE_ID/code.
   
   listrongReliable Piped Logs/strongbr
   On almost all Unix architectures Apache now implements reliable
  
  
  


cvs commit: apachen/htdocs/manual index.html

1997-10-24 Thread dgaudet
dgaudet 97/10/24 02:53:40

  Modified:htdocs/manual index.html
  Log:
  make it clear the docs are for 1.3
  
  Revision  ChangesPath
  1.18  +2 -2  apachen/htdocs/manual/index.html
  
  Index: index.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/index.html,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- index.html1997/10/06 03:06:35 1.17
  +++ index.html1997/10/24 09:53:39 1.18
  @@ -1,7 +1,7 @@
   !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN
   HTML
   HEAD
  -TITLEApache documentation/TITLE
  +TITLEApache 1.3 documentation/TITLE
   /HEAD
   
   !-- Background white, links blue (unvisited), navy (visited), red (active) 
--
  @@ -13,7 +13,7 @@
ALINK=#FF
   
   !--#include virtual=header.html --
  -h1 ALIGN=CENTERApache User's Guide/h1
  +h1 ALIGN=CENTERApache 1.3 User's Guide/h1
   
   hr
   
  
  
  


cvs commit: apachen/src/main conf.h

1997-10-25 Thread dgaudet
dgaudet 97/10/24 18:52:46

  Modified:src  CHANGES Configure
   src/helpers GuessOS
   src/main conf.h
  Log:
  PORT: AIX now uses USE_FCNTL_SERIALIZED_ACCEPT. PR#849
  PORT: i386 AIX does not have memmove. PR#1267
  PORT: HPUX now defaults to using Spencer regex.  PR#482, 1246
  PORT: Some versions of netbsd don't automatically define
  __NetBSD__.  Workaround by defining NETBSD. PR#977
  PORT: Unixware 2.x requires -lgen for syslog. PR#1249
  PORT: Ultrix appears to not have syslog.
  PORT: Basic Gemini port (treat it like unixware212).
  PORT: All SVR4 systems now use NET_SIZE_T = size_t, and
  use HAVE_SHMGET.
  
  Submitted by: various
  Reviewed by:  Dean Gaudet, Jim Jagielski, Martin Kraemer, Brian Behlendorf
  
  Revision  ChangesPath
  1.471 +12 -0 apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.470
  retrieving revision 1.471
  diff -u -r1.470 -r1.471
  --- CHANGES   1997/10/22 08:26:50 1.470
  +++ CHANGES   1997/10/25 01:52:41 1.471
  @@ -1,5 +1,17 @@
   Changes with Apache 1.3b3
   
  +  *) PORT: AIX now uses USE_FCNTL_SERIALIZED_ACCEPT. PR#849
  + PORT: i386 AIX does not have memmove. PR#1267
  + PORT: HPUX now defaults to using Spencer regex.  PR#482, 1246
  + PORT: Some versions of netbsd don't automatically define
  + __NetBSD__.  Workaround by defining NETBSD. PR#977
  + PORT: Unixware 2.x requires -lgen for syslog. PR#1249
  + PORT: Ultrix appears to not have syslog.
  + PORT: Basic Gemini port (treat it like unixware212).
  + PORT: All SVR4 systems now use NET_SIZE_T = size_t, and
  + use HAVE_SHMGET.
  + [various]
  +
 *) Various improvements in detecting config file errors (missing closing
directives for Directory, Files etc. blocks, prohibiting global
server settings in VirtualHost blocks, flagging unhandled multiple
  
  
  
  1.163 +11 -8 apachen/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- Configure 1997/10/24 19:35:16 1.162
  +++ Configure 1997/10/25 01:52:42 1.163
  @@ -223,10 +223,12 @@
   *-hp-hpux10.*)
OS='HP-UX 10'
CFLAGS=$CFLAGS -DHPUX10
  + DEF_WANTHSREGEX=yes
;;
   *-hp-hpux*)
OS='HP-UX'
CFLAGS=$CFLAGS -DHPUX
  + DEF_WANTHSREGEX=yes
;;
   *-sgi-irix64)
   # Note: We'd like to see patches to compile 64-bit, but for now...
  @@ -304,14 +306,15 @@
DBM_LIB=
DB_LIB=
;;
  -*486-*-freebsd*|*486-*-netbsd*)
  - OS='FreeBSD/NETBSD on 486'
  +*-netbsd*)
  + OS='NetBSD'
  + CFLAGS=$CFLAGS -DNETBSD
LIBS=$LIBS -lcrypt
DBM_LIB=
DB_LIB=
;;
  -*-freebsd*|*-netbsd*)
  - OS='FreeBSD/NetBSD'
  +*-freebsd*)
  + OS='FreeBSD'
LIBS=$LIBS -lcrypt
DBM_LIB=
DB_LIB=
  @@ -398,17 +401,17 @@
DEF_WANTHSREGEX=yes
OS='Unixware'
CFLAGS=$CFLAGS -DSVR4 -DNO_LINGCLOSE
  - LIBS=$LIBS -lsocket -lnsl -lcrypt
  + LIBS=$LIBS -lsocket -lnsl -lcrypt -lgen
;;
   *-unixware211)
OS='Unixware 2.1.1'
CFLAGS=$CFLAGS -DUW
  - LIBS=$LIBS -lsocket -lnsl -lcrypt
  + LIBS=$LIBS -lsocket -lnsl -lcrypt -lgen
;;
   *-unixware212)
OS='Unixware 2.1.2'
CFLAGS=$CFLAGS -DUW
  - LIBS=$LIBS -lsocket -lnsl -lcrypt
  + LIBS=$LIBS -lsocket -lnsl -lcrypt -lgen
DBM_LIB=
;;
   maxion-*-sysv4*)
  @@ -419,7 +422,7 @@
;;
   *-sni-sysv4*)
OS='SVR4'
  - CFLAGS=$CFLAGS -DSVR4 -D_XPG_IV -DHAVE_MMAP
  + CFLAGS=$CFLAGS -DSVR4 -D_XPG_IV
DEF_WANTHSREGEX=yes
LIBS=$LIBS -lsocket -lnsl -lc
;;
  
  
  
  1.32  +5 -0  apachen/src/helpers/GuessOS
  
  Index: GuessOS
  ===
  RCS file: /export/home/cvs/apachen/src/helpers/GuessOS,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- GuessOS   1997/10/02 05:24:58 1.31
  +++ GuessOS   1997/10/25 01:52:44 1.32
  @@ -178,6 +178,11 @@
echo ${MACHINE}-whatever-sysv4; exit 0
;;
   
  +UnixWare:5:99*:*)
  + # Gemini, beta release of next rev of unixware
  + echo ${MACHINE}-whatever-unixware212; exit 0
  + ;;
  +
   DYNIX/ptx:4*:*)
echo ${MACHINE}-whatever-sysv4; exit 0
;;
  
  
  
  1.150 +6 -4  apachen/src/main/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.149
  retrieving revision 1.150

cvs commit: apachen/src PORTING

1997-10-25 Thread dgaudet
dgaudet 97/10/24 22:34:42

  Modified:src  PORTING
  Log:
  typo
  
  Revision  ChangesPath
  1.14  +1 -1  apachen/src/PORTING
  
  Index: PORTING
  ===
  RCS file: /export/home/cvs/apachen/src/PORTING,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PORTING   1997/09/30 23:24:49 1.13
  +++ PORTING   1997/10/25 05:34:41 1.14
  @@ -225,7 +225,7 @@
 public servers).
 See htdocs/manual/misc/perf-tuning.html.

  - USE_PTHREADS_SERIALIZED_ACCEPT:
  + USE_PTHREAD_SERIALIZED_ACCEPT:
 Use POSIX mutexes to serialize accept.
 See htdocs/manual/misc/perf-tuning.html.
   
  
  
  


cvs commit: apachen/htdocs/manual/misc perf-tuning.html

1997-10-25 Thread dgaudet
dgaudet 97/10/24 22:35:44

  Modified:htdocs/manual/misc perf-tuning.html
  Log:
  typo
  
  Revision  ChangesPath
  1.3   +1 -1  apachen/htdocs/manual/misc/perf-tuning.html
  
  Index: perf-tuning.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/misc/perf-tuning.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- perf-tuning.html  1997/10/24 09:39:17 1.2
  +++ perf-tuning.html  1997/10/25 05:35:43 1.3
  @@ -368,7 +368,7 @@
   webserver with code-DUSE_USLOCK_SERIALIZED_ACCEPT/code on the
   codeEXTRA_CFLAGS/code.
   
  -dtcodeUSE_PTHREADS_SERIALIZED_ACCEPT/code
  +dtcodeUSE_PTHREAD_SERIALIZED_ACCEPT/code
   dd(1.3 or later) This method uses POSIX mutexes and should work on
   any architecture implementing the full POSIX threads specification,
   however appears to only work on Solaris (2.5 or later).  This is the
  
  
  


cvs commit: apachen/src Configure CHANGES

1997-10-26 Thread dgaudet
dgaudet 97/10/25 16:28:07

  Modified:src  Configure CHANGES
  Log:
  Solaris 2.4 needs spencer regex.
  
  PR: 1321
  Submitted by:   John Line [EMAIL PROTECTED]
  Reviewed by:Lars Eilebrecht, Marc Slemko, Dean Gaudet
  
  Revision  ChangesPath
  1.164 +1 -1  apachen/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.163
  retrieving revision 1.164
  diff -u -r1.163 -r1.164
  --- Configure 1997/10/25 01:52:42 1.163
  +++ Configure 1997/10/25 23:28:04 1.164
  @@ -378,7 +378,7 @@
esac
DBM_LIB=
case $SOLVER in
  - 2[0123]*)
  + 2[01234]*)
DEF_WANTHSREGEX=yes
;;
*)
  
  
  
  1.474 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.473
  retrieving revision 1.474
  diff -u -r1.473 -r1.474
  --- CHANGES   1997/10/25 22:35:15 1.473
  +++ CHANGES   1997/10/25 23:28:05 1.474
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b3
   
  +  *) PORT: Solaris 2.4 needs Spencer regex, the system regex is broken.
  + [John Line [EMAIL PROTECTED]] PR#1321
  +
 *) Default pathname has been changed everywhere to /usr/local/apache
[Sameer [EMAIL PROTECTED]]
   
  
  
  


cvs commit: apachen/src/main alloc.h

1997-10-26 Thread dgaudet
dgaudet 97/10/26 13:14:17

  Modified:src/main alloc.h
  Log:
  fix an indentation problem, and add some comments
  
  Revision  ChangesPath
  1.36  +7 -4  apachen/src/main/alloc.h
  
  Index: alloc.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/alloc.h,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- alloc.h   1997/10/22 20:29:32 1.35
  +++ alloc.h   1997/10/26 21:14:16 1.36
  @@ -248,10 +248,13 @@
* to call in the child, and an argument to be passed to the function.
*/
   
  - enum kill_conditions {
  -  kill_never, kill_always, kill_after_timeout, just_wait,
  -  kill_only_once
  - };
  +enum kill_conditions {
  +kill_never,  /* process is never sent any signals */
  +kill_always, /* process is sent SIGKILL on pool cleanup */
  +kill_after_timeout,  /* SIGTERM, wait 3 seconds, SIGKILL */
  +just_wait,   /* wait forever for the process to 
complete */
  +kill_only_once   /* send SIGTERM and then wait */
  +};
   
   API_EXPORT(void) note_subprocess(pool *a, int pid, enum kill_conditions how);
   API_EXPORT(int) spawn_child_err(pool *, int (*)(void *), void *,
  
  
  


cvs commit: apachen/src/modules/standard mod_mime_magic.c

1997-10-26 Thread dgaudet
dgaudet 97/10/26 13:41:13

  Modified:src/modules/standard mod_mime_magic.c
  Log:
  The indentation was all whacky and there were various bits not in our
  coding style.  Fix it up.  (There's no code changes in this rev.)
  
  Revision  ChangesPath
  1.18  +1192 -1204apachen/src/modules/standard/mod_mime_magic.c
  
  Index: mod_mime_magic.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_mime_magic.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- mod_mime_magic.c  1997/10/22 20:30:25 1.17
  +++ mod_mime_magic.c  1997/10/26 21:41:11 1.18
  @@ -144,26 +144,26 @@
   
   #define MAXMIMESTRING256
   
  -#define HOWMANY 1024/* big enough to recognize most WWW files */
  -#define MAXDESC50   /* max leng of text description */
  -#define MAXstring 64/* max leng of string types */
  +#define HOWMANY 1024 /* big enough to recognize most WWW files */
  +#define MAXDESC50/* max leng of text description */
  +#define MAXstring 64 /* max leng of string types */
   
   struct magic {
  -struct magic *next; /* link to next entry */
  -int lineno; /* line number from magic file */
  +struct magic *next;  /* link to next entry */
  +int lineno;  /* line number from magic file */
   
   short flag;
  -#define INDIR1  /* if '(...)' appears,  */
  -#defineUNSIGNED 2   /* comparison is unsigned */
  -short cont_level;   /* level of  */
  +#define INDIR1   /* if '(...)' appears,  */
  +#defineUNSIGNED 2/* comparison is unsigned */
  +short cont_level;/* level of  */
   struct {
  -char type;  /* byte short long */
  -long offset;/* offset from indirection */
  -}  in;
  -long offset;/* offset to magic number */
  -unsigned char reln; /* relation (0=eq, ''=gt, etc) */
  -char type;  /* int, short, long or string. */
  -char vallen;/* length of string value, if any */
  + char type;  /* byte short long */
  + long offset;/* offset from indirection */
  +} in;
  +long offset; /* offset to magic number */
  +unsigned char reln;  /* relation (0=eq, ''=gt, etc) */
  +char type;   /* int, short, long or string. */
  +char vallen; /* length of string value, if any */
   #define BYTE1
   #define SHORT2
   #define LONG4
  @@ -176,18 +176,18 @@
   #define LELONG11
   #define LEDATE12
   union VALUETYPE {
  -unsigned char b;
  -unsigned short h;
  -unsigned long l;
  -char s[MAXstring];
  -unsigned char hs[2];/* 2 bytes of a fixed-endian short */
  -unsigned char hl[4];/* 2 bytes of a fixed-endian long */
  -} value;/* either number or string */
  -unsigned long mask; /* mask before comparison with value */
  -char nospflag;  /* supress space character */
  + unsigned char b;
  + unsigned short h;
  + unsigned long l;
  + char s[MAXstring];
  + unsigned char hs[2];/* 2 bytes of a fixed-endian short */
  + unsigned char hl[4];/* 2 bytes of a fixed-endian long */
  +} value; /* either number or string */
  +unsigned long mask;  /* mask before comparison with value */
  +char nospflag;   /* supress space character */
   
   /* NOTE: this string is suspected of overrunning - find it! */
  -char desc[MAXDESC]; /* description */
  +char desc[MAXDESC];  /* description */
   };
   
   /*
  @@ -212,37 +212,34 @@
   union record {
   char charptr[RECORDSIZE];
   struct header {
  -char name[NAMSIZ];
  -char mode[8];
  -char uid[8];
  -char gid[8];
  -char size[12];
  -char mtime[12];
  -char chksum[8];
  -char linkflag;
  -char linkname[NAMSIZ];
  -char magic[8];
  -char uname[TUNMLEN];
  -char gname[TGNMLEN];
  -char devmajor[8];
  -char devminor[8];
  -}  header;
  + char name[NAMSIZ];
  + char mode[8];
  + char uid[8];
  + char gid[8];
  + char size[12];
  + char mtime[12];
  + char chksum[8];
  + char linkflag;
  + char linkname[NAMSIZ];
  + char magic[8];
  + char uname[TUNMLEN];
  + char gname[TGNMLEN];
  + char devmajor[8];
  + char devminor[8];
  +} header;
   };
   
   /* The magic field is filled with this if uname and gname are valid. */
  -#defineTMAGICustar/* 7 chars and a null

cvs commit: apachen/src PORTING CHANGES

1997-10-28 Thread dgaudet
dgaudet 97/10/27 22:47:27

  Modified:src  PORTING CHANGES
  Log:
  Document the WANTHSREGEX change.
  
  Revision  ChangesPath
  1.16  +7 -2  apachen/src/PORTING
  
  Index: PORTING
  ===
  RCS file: /export/home/cvs/apachen/src/PORTING,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- PORTING   1997/10/27 19:10:34 1.15
  +++ PORTING   1997/10/28 06:47:24 1.16
  @@ -116,8 +116,13 @@
   below]) to handle OS-specific code. Each code that has and requires
   such OS-specific code will require a unique system cookie defined
   in 'CFLAGS'. You will also note that Configure also goes ahead and
  -predefines the LIBS and LDFLAGS Makefile variables (DEF_WANTHSREGEX is
  -explained below).
  +predefines the LIBS and LDFLAGS Makefile variables.
  +
  +DEF_WANTHSREGEX indicates the default setting of the WANTHSREGEX rule.
  +If left undefined it'll default to yes.  Yes means the src/regex/
  +directory, containing Henry Spencer's regex library will be used rather
  +than any system supplied regex.  It's been our experience that system
  +supplied regex libraries are generally buggy, and to be avoided.
   
   conf.h:
   ===
  
  
  
  1.479 +4 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.478
  retrieving revision 1.479
  diff -u -r1.478 -r1.479
  --- CHANGES   1997/10/27 19:10:32 1.478
  +++ CHANGES   1997/10/28 06:47:25 1.479
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b3
   
  +  *) PORT: All ports which don't otherwise define DEF_WANTHSREGEX will
  + get Spencer regex by default.  This is to avoid having to
  + discover bugs in operating system libraries.  [Dean Gaudet]
  +
 *) PORT: Fix PR#467 by generating warnings on systems which we have
not been able to get working USE_*_SERIALIZED_ACCEPT settings for.
Document this a bit more in src/PORTING.  [Dean Gaudet] PR#467
  
  
  


cvs commit: apachen/src/main http_main.c

1997-10-30 Thread dgaudet
dgaudet 97/10/30 11:13:35

  Modified:src  CHANGES
   src/main http_main.c
  Log:
  Improve the error message generated when the server is busy.
  
  PR:   1293
  Reviewed by:  Martin Kraemer, Jim Jagielski
  
  Revision  ChangesPath
  1.480 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.479
  retrieving revision 1.480
  diff -u -r1.479 -r1.480
  --- CHANGES   1997/10/28 06:47:25 1.479
  +++ CHANGES   1997/10/30 19:13:31 1.480
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b3
   
  +  *) Improve the warning message generated when the server is busy.
  + [Dean Gaudet] PR#1293
  +
 *) PORT: All ports which don't otherwise define DEF_WANTHSREGEX will
get Spencer regex by default.  This is to avoid having to
discover bugs in operating system libraries.  [Dean Gaudet]
  
  
  
  1.240 +10 -5 apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.239
  retrieving revision 1.240
  diff -u -r1.239 -r1.240
  --- http_main.c   1997/10/27 19:10:36 1.239
  +++ http_main.c   1997/10/30 19:13:34 1.240
  @@ -3002,6 +3002,7 @@
   int free_length;
   int free_slots[MAX_SPAWN_RATE];
   int last_non_dead;
  +int total_non_dead;
   
   /* initialize the free_list */
   free_length = 0;
  @@ -3009,6 +3010,7 @@
   to_kill = -1;
   idle_count = 0;
   last_non_dead = -1;
  +total_non_dead = 0;
   
   sync_scoreboard_image();
   for (i = 0; i  daemons_limit; ++i) {
  @@ -3041,6 +3043,7 @@
break;
}
if (ss-status != SERVER_DEAD) {
  + ++total_non_dead;
last_non_dead = i;
   #ifdef OPTIMIZE_TIMEOUTS
if (ss-timeout_len) {
  @@ -3086,11 +3089,13 @@
idle_spawn_rate = 1;
}
else {
  - if (idle_spawn_rate = 4) {
  - aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, server_conf,
  - server seems busy, spawning %d children (you may need 
  - to increase StartServers, or Min/MaxSpareServers),
  - idle_spawn_rate);
  + if (idle_spawn_rate = 8) {
  + aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, server_conf,
  + server seems busy, (you may need 
  + to increase StartServers, or Min/MaxSpareServers), 
  + spawning %d children, there are %d idle, and 
  + %d total children, idle_spawn_rate,
  + idle_count, total_non_dead);
}
for (i = 0; i  free_length; ++i) {
make_child(server_conf, free_slots[i], now);
  
  
  


cvs commit: apachen/src/modules/standard mod_mime_magic.c

1997-10-30 Thread dgaudet
dgaudet 97/10/30 11:20:52

  Modified:src  CHANGES
   src/modules/standard mod_mime_magic.c
  Log:
  Bug Fixes:
  
  - gzip -cdq requires at least 4k of a partial gzipped file, we
  were sending it only 1k, and it wouldn't produce any output.  But raising
  HOWMANY to 4k has implications on the performance of the (lame) ascmagic()
  code.  So ascmagic() cheats and only looks at 1k (the previous HOWMANY
  setting)
  
  - use spawn_child() interface to avoid a resource leak (zombie
  child); I don't think even worked on WIN32 before, but it might now... I
  special case and use spawnvp() on WIN32.
  
  - use pfopen()/popenf() to avoid resource leaks
  
  Cleanups:
  
  - no need to test return from palloc since it never returns NULL
  
  - ensure all log messages include the module name
  
  - Some cases were assuming that aplog_error was a never returning
  function.  Deal gracefully by propagating an error code back
  up the call chain.
  
  - remove some useless code in fsmagic() -- we don't use lstat(), we
  use stat() so the only possibility where we'll get S_IFLNK is
  if it's a broken symlink.
  
  - for various errors just DECLINE rather than cause the phase to abort
  early (a lesson we're learning from all the M_PUT changes we've
  had recently)
  
  PR:   1205
  Reviewed by:  Jim Jagielski, Martin Kraemer
  
  Revision  ChangesPath
  1.482 +5 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.481
  retrieving revision 1.482
  diff -u -r1.481 -r1.482
  --- CHANGES   1997/10/30 19:17:54 1.481
  +++ CHANGES   1997/10/30 19:20:48 1.482
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3b3
   
  +  *) Various mod_mime_magic bug fixes and cleanups: Uncompression
  + should work, it should work on WIN32, and a few resource
  + leaks and abort conditions are fixed.
  + [Dean Gaudet] PR#1205
  +
 *) PORT: On AIX 1.x files can't be named '@', fix the proxy cache
to use '%' instead of '@' in its encodings.
[David Schuler [EMAIL PROTECTED]] PR#1317
  
  
  
  1.19  +179 -206  apachen/src/modules/standard/mod_mime_magic.c
  
  Index: mod_mime_magic.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_mime_magic.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mod_mime_magic.c  1997/10/26 21:41:11 1.18
  +++ mod_mime_magic.c  1997/10/30 19:20:51 1.19
  @@ -144,7 +144,10 @@
   
   #define MAXMIMESTRING256
   
  -#define HOWMANY 1024 /* big enough to recognize most WWW files */
  +/* HOWMANY must be at least 4096 to make gzip -dcq work */
  +#define HOWMANY  4096
  +/* SMALL_HOWMANY limits how much work we do to figure out text files */
  +#define SMALL_HOWMANY 1024
   #define MAXDESC50/* max leng of text description */
   #define MAXstring 64 /* max leng of string types */
   
  @@ -504,8 +507,8 @@
   {
   magic_server_config_rec *base = (magic_server_config_rec *) basev;
   magic_server_config_rec *add = (magic_server_config_rec *) addv;
  -magic_server_config_rec *new
  -= (magic_server_config_rec *) palloc(p, sizeof(magic_server_config_rec));
  +magic_server_config_rec *new = (magic_server_config_rec *)
  + palloc(p, sizeof(magic_server_config_rec));
   
   new-magicfile = add-magicfile ? add-magicfile : base-magicfile;
   if (add-magic  add-last) {
  @@ -565,12 +568,6 @@
   magic_req_rec *req_dat = (magic_req_rec *) palloc(r-pool,
  sizeof(magic_req_rec));
   
  -if (!req_dat) {
  - aplog_error(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r-server,
  - %s: memory allocation failure in magic_set_config(),
  - MODNAME);
  - return NULL;
  -}
   req_dat-head = req_dat-tail = (magic_rsl *) NULL;
   set_module_config(r-request_config, mime_magic_module, req_dat);
   return req_dat;
  @@ -587,8 +584,7 @@
   /* make sure we have a list to put it in */
   if (!req_dat) {
aplog_error(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r-server,
  - %s: request config should not be NULL,
  - MODNAME);
  + MODNAME : request config should not be NULL);
if (!(req_dat = magic_set_config(r))) {
/* failure */
return -1;
  @@ -596,13 +592,7 @@
   }
   
   /* allocate the list entry */
  -if (!(rsl = (magic_rsl *) palloc(r-pool, sizeof(magic_rsl {
  - aplog_error(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r-server,
  - %s: memory allocation failure in magic_rsl_add(),
  - MODNAME);
  - /* failure */
  - return -1

cvs commit: apache/htdocs/manual/mod core.html mod_actions.html mod_auth_anon.html mod_auth_dbm.html mod_cern_meta.html mod_cgi.html mod_env.html mod_imap.html mod_include.html mod_negotiation.html mod_status.html

1997-11-01 Thread dgaudet
dgaudet 97/11/01 15:39:48

  Modified:htdocs/manual Tag: APACHE_1_2_X content-negotiation.html
custom-error.html dns-caveats.html env.html
host.html index.html install.html invoking.html
man-template.html multilogs.html
new_features_1_0.html new_features_1_1.html
new_features_1_2.html process-model.html
suexec.html vhosts-in-depth.html virtual-host.html
   htdocs/manual/misc Tag: APACHE_1_2_X API.html
client_block_api.html fin_wait_2.html nopgp.html
perf-bsd44.html perf-dec.html perf.html
security_tips.html vif-info.html
   htdocs/manual/mod Tag: APACHE_1_2_X core.html
mod_actions.html mod_auth_anon.html
mod_auth_dbm.html mod_cern_meta.html mod_cgi.html
mod_env.html mod_imap.html mod_include.html
mod_negotiation.html mod_status.html
  Log:
  Merge in doc changes that are relevant from 1.3 branch.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.10.2.1  +11 -11apache/htdocs/manual/content-negotiation.html
  
  Index: content-negotiation.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/content-negotiation.html,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- content-negotiation.html  1997/06/04 11:07:47 1.10
  +++ content-negotiation.html  1997/11/01 23:39:18 1.10.2.1
  @@ -22,7 +22,7 @@
   couple of features to give more intelligent handling of requests from
   browsers which send incomplete negotiation information.  p
   
  -Content negotiation is provided by the 
  +Content negotiation is provided by the
   a href=mod/mod_negotiation.htmlmod_negotiation/a module,
   which is compiled in by default.
   
  @@ -47,7 +47,7 @@
   /pre
   
   Note that this preference will only be applied when there is a choice
  -of representations and they vary by language. 
  +of representations and they vary by language.
   p
   
   As an example of a more complex request, this browser has been
  @@ -78,12 +78,12 @@
   
   In order to negotiate a resource, the server needs to be given
   information about each of the variants. This is done in one of two
  -ways: 
  +ways:
   
   ul
 li Using a type map (i.e., a code*.var/code file) which
  names the files containing the variants explicitly
  -  li Or using a 'MultiViews' search, where the server does an implicit 
  +  li Or using a 'MultiViews' search, where the server does an implicit
  filename pattern match, and chooses from among the results.
   /ul
   
  @@ -154,7 +154,7 @@
  interpreted as URLs relative to the map file; they must be on
  the same server (!), and they must refer to files to which the
  client would be granted access if they were to be requested
  -   directly. 
  +   directly.
 dt codeContent-type:/code
 dd media type --- charset, level and qs parameters may be given.  These
  are often referred to as MIME types; typical media types are
  @@ -244,7 +244,7 @@
   trthDimension
   thNotes
   trtdMedia Type
  -tdBrowser indicates preferences on Accept: header. Each item 
  +tdBrowser indicates preferences on Accept: header. Each item
   can have an associated quality factor. Variant description can also
   have a quality factor.
   trtdLanguage
  @@ -292,7 +292,7 @@
 else the order of languages on the Accept-Language header.
   
   liSelect the variants with the highest 'level' media parameter
  -  (used to give the version of text/html media types). 
  +  (used to give the version of text/html media types).
   
   liSelect only unencoded variants, if there is a mix of encoded
 and non-encoded variants. If either all variants are encoded
  @@ -366,7 +366,7 @@
   The explicit types have no quality factor, so they default to a
   preference of 1.0 (the highest). The wildcard */* is given
   a low preference of 0.01, so other types will only be returned if
  -no variant matches an explicitly listed type. 
  +no variant matches an explicitly listed type.
   p
   
   If the Accept: header contains ino/i q factors at all, Apache sets
  @@ -386,7 +386,7 @@
   The reason for setting this language quality factor for
   variant with no language to a very low value is to allow
   for a default variant which can be supplied if none of the
  -other variants match the browser's language preferences. 
  +other variants match the browser's language preferences.
   
   For example, consider the situation with three variants:
   
  @@ -409,9 +409,9 @@
   document, provided it is still within date. But if the resource is
   subject to content negotiation at the server

cvs commit: apache/htdocs/manual/mod core.html mod_actions.html mod_auth_anon.html mod_auth_dbm.html mod_cern_meta.html mod_cgi.html mod_env.html mod_example.html mod_imap.html mod_include.html mod_mime.html mod_negotiation.html mod_proxy.html mod_status.html

1997-11-02 Thread dgaudet
dgaudet 97/11/01 16:19:48

  Modified:htdocs/manual Tag: APACHE_1_2_X LICENSE
content-negotiation.html custom-error.html
dns-caveats.html env.html host.html index.html
install.html invoking.html man-template.html
multilogs.html new_features_1_0.html
new_features_1_1.html new_features_1_2.html
process-model.html suexec.html vhosts-in-depth.html
virtual-host.html
   htdocs/manual/misc Tag: APACHE_1_2_X API.html FAQ.html
client_block_api.html compat_notes.html
fin_wait_2.html nopgp.html perf-bsd44.html
perf-dec.html perf.html security_tips.html
vif-info.html
   htdocs/manual/mod Tag: APACHE_1_2_X core.html
mod_actions.html mod_auth_anon.html
mod_auth_dbm.html mod_cern_meta.html mod_cgi.html
mod_env.html mod_example.html mod_imap.html
mod_include.html mod_mime.html mod_negotiation.html
mod_proxy.html mod_status.html
  Removed: htdocs/manual/misc Tag: APACHE_1_2_X
known_client_problems.html
  Log:
  forget it, revert the last two changes
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.3.2.2   +1 -2  apache/htdocs/manual/LICENSE
  
  Index: LICENSE
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/LICENSE,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- LICENSE   1997/11/02 00:15:58 1.3.2.1
  +++ LICENSE   1997/11/02 00:19:04 1.3.2.2
  @@ -20,8 +20,7 @@
*
* 4. The names Apache Server and Apache Group must not be used to
*endorse or promote products derived from this software without
  - *prior written permission. For written permission, please contact
  - *[EMAIL PROTECTED]
  + *prior written permission.
*
* 5. Redistributions of any form whatsoever must retain the following
*acknowledgment:
  
  
  
  1.10.2.2  +11 -11apache/htdocs/manual/content-negotiation.html
  
  Index: content-negotiation.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/content-negotiation.html,v
  retrieving revision 1.10.2.1
  retrieving revision 1.10.2.2
  diff -u -r1.10.2.1 -r1.10.2.2
  --- content-negotiation.html  1997/11/01 23:39:18 1.10.2.1
  +++ content-negotiation.html  1997/11/02 00:19:05 1.10.2.2
  @@ -22,7 +22,7 @@
   couple of features to give more intelligent handling of requests from
   browsers which send incomplete negotiation information.  p
   
  -Content negotiation is provided by the
  +Content negotiation is provided by the 
   a href=mod/mod_negotiation.htmlmod_negotiation/a module,
   which is compiled in by default.
   
  @@ -47,7 +47,7 @@
   /pre
   
   Note that this preference will only be applied when there is a choice
  -of representations and they vary by language.
  +of representations and they vary by language. 
   p
   
   As an example of a more complex request, this browser has been
  @@ -78,12 +78,12 @@
   
   In order to negotiate a resource, the server needs to be given
   information about each of the variants. This is done in one of two
  -ways:
  +ways: 
   
   ul
 li Using a type map (i.e., a code*.var/code file) which
  names the files containing the variants explicitly
  -  li Or using a 'MultiViews' search, where the server does an implicit
  +  li Or using a 'MultiViews' search, where the server does an implicit 
  filename pattern match, and chooses from among the results.
   /ul
   
  @@ -154,7 +154,7 @@
  interpreted as URLs relative to the map file; they must be on
  the same server (!), and they must refer to files to which the
  client would be granted access if they were to be requested
  -   directly.
  +   directly. 
 dt codeContent-type:/code
 dd media type --- charset, level and qs parameters may be given.  These
  are often referred to as MIME types; typical media types are
  @@ -244,7 +244,7 @@
   trthDimension
   thNotes
   trtdMedia Type
  -tdBrowser indicates preferences on Accept: header. Each item
  +tdBrowser indicates preferences on Accept: header. Each item 
   can have an associated quality factor. Variant description can also
   have a quality factor.
   trtdLanguage
  @@ -292,7 +292,7 @@
 else the order of languages on the Accept-Language header.
   
   liSelect the variants with the highest 'level' media parameter
  -  (used to give the version of text/html media types).
  +  (used to give the version of text/html media types

cvs commit: apachen/src CHANGES Configure

1997-11-03 Thread dgaudet
dgaudet 97/11/02 20:33:19

  Modified:src  CHANGES Configure
  Log:
  Warn user about default path change if /usr/local/etc/httpd is found.
  
  Submitted by: Lars Eilebrecht
  Reviewed by:  Martin Kraemer, Dean Gaudet
  
  Revision  ChangesPath
  1.483 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.482
  retrieving revision 1.483
  diff -u -r1.482 -r1.483
  --- CHANGES   1997/10/30 19:20:48 1.482
  +++ CHANGES   1997/11/03 04:33:16 1.483
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b3
   
  +  *) Warn user that default path has changed if /usr/local/etc/httpd
  + is found on the system.  [Lars Eilebrecht]
  +
 *) Various mod_mime_magic bug fixes and cleanups: Uncompression
should work, it should work on WIN32, and a few resource
leaks and abort conditions are fixed.
  
  
  
  1.166 +18 -0 apachen/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- Configure 1997/10/27 19:10:33 1.165
  +++ Configure 1997/11/03 04:33:17 1.166
  @@ -98,6 +98,24 @@
   if [ -f modules.c ] ; then mv modules.c modules.c.bak; fi
   
   
  +# If we find the directory /usr/local/etc/httpd and there is
  +# no HTTPD_ROOT flag set in the Configuration file we assume
  +# that the user was using the old default root directory
  +# and issue a notice about it.
  +#
  +
  +test ! -d /usr/local/etc/httpd/ \
  + || if ! egrep '^EXTRA_CFLAGS.*HTTPD_ROOT' $file /dev/null
  +then
  +  echo  | Please note that the default httpd root directory has changed
  +  echo  | from '/usr/local/etc/httpd/' to '/usr/local/apache/.'
  +  echo  | You may add '-DHTTPD_ROOT=\\\/usr/local/etc/httpd\\\' to 
EXTRA_CFLAGS
  +  echo  | in your Configuration file (and re-run Configure) or start
  +  echo  | httpd with the option '-d /usr/local/etc/httpd' if you still
  +  echo  | want to use the old root directory for your server.
  +fi
  +
  +
   # Start creating the Makefile. We add some comments and
   # then fold in the modules that were included in Configuration
   #
  
  
  


cvs commit: apachen/src/main http_main.c

1997-11-03 Thread dgaudet
dgaudet 97/11/03 02:11:44

  Modified:src  CHANGES
   src/main http_main.c
  Log:
  Fix a mild race condition in unblock_alarms() involving a SIGALRM showing
  up after a SIGTERM.
  
  PR:   1211
  Reviewed by:  Marc Slemko, Martin Kraemer
  
  Revision  ChangesPath
  1.484 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.483
  retrieving revision 1.484
  diff -u -r1.483 -r1.484
  --- CHANGES   1997/11/03 04:33:16 1.483
  +++ CHANGES   1997/11/03 10:11:39 1.484
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b3
   
  +  *) A mild SIGTERM/SIGALRM race condition was eliminated.
  + [Dean Gaudet] PR#1211
  +
 *) Warn user that default path has changed if /usr/local/etc/httpd
is found on the system.  [Lars Eilebrecht]
   
  
  
  
  1.243 +28 -27apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.242
  retrieving revision 1.243
  diff -u -r1.242 -r1.243
  --- http_main.c   1997/11/01 22:15:59 1.242
  +++ http_main.c   1997/11/03 10:11:42 1.243
  @@ -678,6 +678,14 @@
   }
   #endif
   
  +/* a clean exit from a child with proper cleanup */
  +static void __attribute__((noreturn)) clean_child_exit(int code)
  +{
  +child_exit_modules(pconf, server_conf);
  +destroy_pool(pconf);
  +exit(code);
  +}
  +
   void timeout(int sig)
   {/* Also called on SIGPIPE */
   char errstr[MAX_STRING_LEN];
  @@ -688,6 +696,9 @@
alarm_pending = 1;
return;
   }
  +if (exit_after_unblock) {
  + clean_child_exit(0);
  +}
   
   if (!current_conn) {
ap_longjmp(jmpbuffer, 1);
  @@ -760,10 +771,16 @@
   --alarms_blocked;
   if (alarms_blocked == 0) {
if (exit_after_unblock) {
  + /* We have a couple race conditions to deal with here, we can't
  +  * allow a timeout that comes in this small interval to allow
  +  * the child to jump back to the main loop.  Instead we block
  +  * alarms again, and then note that exit_after_unblock is
  +  * being dealt with.  We choose this way to solve this so that
  +  * the common path through unblock_alarms() is really short.
  +  */
  + ++alarms_blocked;
exit_after_unblock = 0;
  - child_exit_modules(pconf, server_conf);
  - destroy_pool(pconf);
  - exit(0);
  + clean_child_exit(0);
}
if (alarm_pending) {
alarm_pending = 0;
  @@ -1964,9 +1981,7 @@
exit_after_unblock = 1;
   }
   else {
  - child_exit_modules(pconf, server_conf);
  - destroy_pool(pconf);
  - exit(0);
  + clean_child_exit(0);
   }
   }
   
  @@ -2668,16 +2683,12 @@
   
sync_scoreboard_image();
if (scoreboard_image-global.exit_generation = generation) {
  - child_exit_modules(pconf, server_conf);
  - destroy_pool(pconf);
  - exit(0);
  + clean_child_exit(0);
}
   
if ((max_requests_per_child  0
  ++requests_this_child = max_requests_per_child)) {
  - child_exit_modules(pconf, server_conf);
  - destroy_pool(pconf);
  - exit(0);
  + clean_child_exit(0);
}
   
(void) update_child_status(my_child_num, SERVER_READY, (request_rec *) 
NULL);
  @@ -2700,9 +2711,7 @@
if (errno == EFAULT) {
aplog_error(APLOG_MARK, APLOG_ERR, server_conf,
select: (listen) fatal, child exiting);
  - child_exit_modules(pconf, server_conf);
  - destroy_pool(pconf);
  - exit(1);
  + clean_child_exit(1);
}
   #endif
aplog_error(APLOG_MARK, APLOG_ERR, server_conf, select: 
(listen));
  @@ -2733,9 +2742,7 @@
break;
if (deferred_die) {
/* we didn't get a socket, and we were told to die */
  - child_exit_modules(pconf, server_conf);
  - destroy_pool(pconf);
  - exit(0);
  + clean_child_exit(0);
}
}
   
  @@ -2758,18 +2765,14 @@
usr1_just_die = 1;
if (deferred_die) {
/* ok maybe not, see ya later */
  - child_exit_modules(pconf, server_conf);
  - destroy_pool(pconf);
  - exit(0);
  + clean_child_exit(0);
}
/* or maybe we missed a signal, you never know on systems
 * without reliable signals

cvs commit: apachen/src/test time-sem.c

1997-11-04 Thread dgaudet
dgaudet 97/11/03 23:57:43

  Modified:src/test time-sem.c
  Log:
  make it clear that fcntl/flock open lock file in cwd
  
  Revision  ChangesPath
  1.2   +2 -0  apachen/src/test/time-sem.c
  
  Index: time-sem.c
  ===
  RCS file: /export/home/cvs/apachen/src/test/time-sem.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- time-sem.c1997/11/04 02:47:13 1.1
  +++ time-sem.c1997/11/04 07:57:43 1.2
  @@ -59,6 +59,7 @@
   unlock_it.l_type   = F_UNLCK;  /* set exclusive/write lock */
   unlock_it.l_pid= 0;/* pid not actually interesting */
   
  +printf(opening test-lock-thing in current directory\n);
   fcntl_fd = open(test-lock-thing, O_CREAT | O_WRONLY | O_EXCL, 0644);
   if (fcntl_fd == -1)
   {
  @@ -105,6 +106,7 @@
   accept_mutex_init(void)
   {
   
  +printf(opening test-lock-thing in current directory\n);
   flock_fd = open(test-lock-thing, O_CREAT | O_WRONLY | O_EXCL, 0644);
   if (flock_fd == -1)
   {
  
  
  


cvs commit: apachen/src/test time-sem.c

1997-11-04 Thread dgaudet
dgaudet 97/11/04 00:33:13

  Modified:src/test time-sem.c
  Log:
  latest greatest time-sem.c
  
  Revision  ChangesPath
  1.3   +64 -15apachen/src/test/time-sem.c
  
  Index: time-sem.c
  ===
  RCS file: /export/home/cvs/apachen/src/test/time-sem.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- time-sem.c1997/11/04 07:57:43 1.2
  +++ time-sem.c1997/11/04 08:33:13 1.3
  @@ -1,23 +1,38 @@
   /*
  -Date: Sat, 1 Nov 1997 16:53:52 -0800 (PST)
  -From: Dean Gaudet [EMAIL PROTECTED]
  +time-sem.c has the basics of the semaphores we use in http_main.c.  It's
  +intended for timing differences between various methods on an
  +architecture.  In practice we've found many things affect which semaphore
  +to be used:
  +
  +- NFS filesystems absolutely suck for fcntl() and flock()
  +
  +- uslock absolutely sucks on single-processor IRIX boxes, but
  + absolutely rocks on multi-processor boxes.  The converse
  + is true for fcntl.  sysvsem seems a moderate balance.
  +
  +- Under Solaris you can't have too many processes use SEM_UNDO, there
  + might be a tuneable somewhere that increases the limit from 29.
  + We're not sure what the tunable is, so there's a define
  + NO_SEM_UNDO which can be used to simulate us trapping/blocking
  + signals to be able to properly release the semaphore on a clean
  + child death.
  +
  +argv[1] is the #children, argv[2] is the #iterations per child
  +
  +You should run each over many different #children inputs, and choose
  +#iter such that the program runs for at least a second or so... or even
  +longer depending on your patience.
   
  -This time-sem.c includes the necessary signal manipulations to allow us to
  -continue to use pthreads.  It appears to still be and order of magnitude
  -faster than fcntl locking.  I'm a little too busy to make a patch though,
  -so if someone could take the pthread code in time-sem.c here and compare
  -it against the server ... and generate a patch, that'd be great.  You also
  -have to properly release the mutex on any of the three unblocked signals --
  -which you should do in the handlers we already have for those signals,
  -so that we don't have to also instate a handler during the critical
  -section ...
  -
  -Dean
  +compile with:
   
   gcc -o time-FCNTL -Wall -O time-sem.c -DUSE_FCNTL_SERIALIZED_ACCEPT
   gcc -o time-FLOCK -Wall -O time-sem.c -DUSE_FLOCK_SERIALIZED_ACCEPT
  -gcc -o time-SEM -Wall -O time-sem.c -DUSE_SYSVSEM_SERIALIZED_ACCEPT
  +gcc -o time-SYSVSEM -Wall -O time-sem.c -DUSE_SYSVSEM_SERIALIZED_ACCEPT
  +gcc -o time-SYSVSEM2 -Wall -O time-sem.c -DUSE_SYSVSEM_SERIALIZED_ACCEPT 
-DNO_SEM_UNDO
   gcc -o time-PTHREAD -Wall -O time-sem.c -DUSE_PTHREAD_SERIALIZED_ACCEPT 
-lpthread
  +gcc -o time-USLOCK -Wall -O time-sem.c -DUSE_USLOCK_SERIALIZED_ACCEPT
  +
  +not all versions work on all systems.
   */
   
   #include errno.h
  @@ -146,6 +161,10 @@
   #include sys/sem.h
   
   static   int sem_id = -1;
  +#ifdef NO_SEM_UNDO
  +static sigset_t accept_block_mask;
  +static sigset_t accept_previous_mask;
  +#endif
   
   void accept_mutex_init(void)
   {
  @@ -167,15 +186,29 @@
  perror (semctl);
   exit(1);
   }
  +#ifdef NO_SEM_UNDO
  +sigfillset(accept_block_mask);
  +sigdelset(accept_block_mask, SIGHUP);
  +sigdelset(accept_block_mask, SIGTERM);
  +sigdelset(accept_block_mask, SIGUSR1);
  +#endif
   }
   
   void accept_mutex_on()
   {
   struct sembuf op;
   
  +#ifdef NO_SEM_UNDO
  +if (sigprocmask(SIG_BLOCK, accept_block_mask, accept_previous_mask)) {
  + perror(sigprocmask(SIG_BLOCK));
  + exit (1);
  +}
  +op.sem_flg = 0;
  +#else
  +op.sem_flg = SEM_UNDO;
  +#endif
   op.sem_num = 0;
   op.sem_op  = -1;
  -op.sem_flg = SEM_UNDO;
   if (semop(sem_id, op, 1)  0) {
perror (accept_mutex_on);
exit (1);
  @@ -188,15 +221,30 @@
   
   op.sem_num = 0;
   op.sem_op  = 1;
  +#ifdef NO_SEM_UNDO
  +op.sem_flg = 0;
  +#else
   op.sem_flg = SEM_UNDO;
  +#endif
   if (semop(sem_id, op, 1)  0) {
perror (accept_mutex_off);
   exit (1);
   }
  +#ifdef NO_SEM_UNDO
  +if (sigprocmask(SIG_SETMASK, accept_previous_mask, NULL)) {
  + perror(sigprocmask(SIG_SETMASK));
  + exit (1);
  +}
  +#endif
   }
   
   #elif defined (USE_PTHREAD_SERIALIZED_ACCEPT)
   
  +/* note: pthread mutexes aren't released on child death, hence the
  + * signal goop ... in a real implementation we'd do special things
  + * during hup, term, usr1.
  + */
  +
   #include pthread.h
   
   static pthread_mutex_t *mutex;
  @@ -403,5 +451,6 @@
   }
   last.tv_usec = ms;
   printf (%8lu.%06lu\n, last.tv_sec, last.tv_usec);
  +exit(0);
   }
   
  
  
  


cvs commit: apachen/src/modules/standard mod_usertrack.c

1997-11-05 Thread dgaudet
dgaudet 97/11/05 03:23:24

  Modified:src  CHANGES
   src/modules/standard mod_usertrack.c
  Log:
  Fix a year 2100+ formatting problem with mod_usertrack.
  
  PR:   1342
  Submitted by: Paul Eggert [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet, Marc Slemko, Martin Kraemer
  
  Revision  ChangesPath
  1.485 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.484
  retrieving revision 1.485
  diff -u -r1.484 -r1.485
  --- CHANGES   1997/11/03 10:11:39 1.484
  +++ CHANGES   1997/11/05 11:23:21 1.485
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b3
   
  +  *) Fix a year formatting bug in mod_usertrack.
  + [Paul Eggert [EMAIL PROTECTED]] PR#1342
  +
 *) A mild SIGTERM/SIGALRM race condition was eliminated.
[Dean Gaudet] PR#1211
   
  
  
  
  1.21  +1 -1  apachen/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_usertrack.c   1997/10/22 20:30:31 1.20
  +++ mod_usertrack.c   1997/11/05 11:23:23 1.21
  @@ -194,7 +194,7 @@
   %s%s; path=/; expires=%s, %.2d-%s-%.2d %.2d:%.2d:%.2d GMT,
   COOKIE_NAME, cookiebuf, days[tms-tm_wday],
   tms-tm_mday, month_names[tms-tm_mon],
  -  (tms-tm_year = 100) ? tms-tm_year - 100 : tms-tm_year,
  + tms-tm_year % 100,
   tms-tm_hour, tms-tm_min, tms-tm_sec);
   }
   else
  
  
  


cvs commit: apachen/conf srm.conf-dist srm.conf-dist-win

1997-11-05 Thread dgaudet
dgaudet 97/11/05 03:32:38

  Modified:conf srm.conf-dist srm.conf-dist-win
  Log:
  Add PHP3's mime-types as an example.
  
  Submitted by: Rasmus Lerdorf
  Reviewed by:  Dean Gaudet, Paul Sutton
  
  Revision  ChangesPath
  1.17  +5 -0  apachen/conf/srm.conf-dist
  
  Index: srm.conf-dist
  ===
  RCS file: /export/home/cvs/apachen/conf/srm.conf-dist,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- srm.conf-dist 1997/08/19 23:00:23 1.16
  +++ srm.conf-dist 1997/11/05 11:32:36 1.17
  @@ -149,6 +149,11 @@
   # make certain files to be certain types.
   # Format: AddType type/subtype ext1
   
  +# For example, the PHP3 module (not part of the Apache distribution)
  +# will typically use:
  +#AddType application/x-httpd-php3 .phtml
  +#AddType application/x-httpd-php3-source .phps
  +
   # AddHandler allows you to map certain file extensions to handlers,
   # actions unrelated to filetype. These can be either built into the server
   # or added with the Action command (see below)
  
  
  
  1.5   +5 -0  apachen/conf/srm.conf-dist-win
  
  Index: srm.conf-dist-win
  ===
  RCS file: /export/home/cvs/apachen/conf/srm.conf-dist-win,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- srm.conf-dist-win 1997/10/25 19:10:10 1.4
  +++ srm.conf-dist-win 1997/11/05 11:32:37 1.5
  @@ -153,6 +153,11 @@
   # make certain files to be certain types.
   # Format: AddType type/subtype ext1
   
  +# For example, the PHP3 module (not part of the Apache distribution)
  +# will typically use:
  +#AddType application/x-httpd-php3 .phtml
  +#AddType application/x-httpd-php3-source .phps
  +
   # AddHandler allows you to map certain file extensions to handlers,
   # actions unrelated to filetype. These can be either built into the server
   # or added with the Action command (see below)
  
  
  


cvs commit: apache/src CHANGES mod_include.c

1997-11-05 Thread dgaudet
dgaudet 97/11/05 03:40:14

  Modified:src  Tag: APACHE_1_2_X CHANGES mod_include.c
  Log:
  mod_include did not properly handle all possible redirects from sub-reqs.
  
  Submitted by: Ken Coar
  Reviewed by:  Dean Gaudet, Roy Fielding, Ralf Engelschall
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.286.2.57 +3 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.286.2.56
  retrieving revision 1.286.2.57
  diff -u -r1.286.2.56 -r1.286.2.57
  --- CHANGES   1997/11/05 11:38:51 1.286.2.56
  +++ CHANGES   1997/11/05 11:40:12 1.286.2.57
  @@ -6,6 +6,9 @@
r-filename.  Since those two are meant to be in sync with each other
this is a bug.  [Paul B. Henson [EMAIL PROTECTED]]
   
  +  *) mod_include did not properly handle all possible redirects from sub-
  + requests.  [Ken Coar]
  +
 *) Inetd mode (which is buggy) uses timeouts without having setup the
jmpbuffer. [Dean Gaudet] PR#1064
   
  
  
  
  1.33.2.6  +3 -1  apache/src/mod_include.c
  
  Index: mod_include.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_include.c,v
  retrieving revision 1.33.2.5
  retrieving revision 1.33.2.6
  diff -u -r1.33.2.5 -r1.33.2.6
  --- mod_include.c 1997/07/31 08:50:02 1.33.2.5
  +++ mod_include.c 1997/11/05 11:40:13 1.33.2.6
  @@ -494,6 +494,7 @@
   int include_cgi(char *s, request_rec *r)
   {
   request_rec *rr = sub_req_lookup_uri (s, r);
  +int rr_status;
   
   if (rr-status != 200) return -1;
   
  @@ -515,7 +516,8 @@
   
   /* Run it. */
   
  -if (run_sub_req (rr) == REDIRECT) {
  +rr_status = run_sub_req(rr);
  +if (is_HTTP_REDIRECT(rr_status)) {
   char *location = table_get (rr-headers_out, Location);
   location = escape_html(rr-pool, location);
rvputs(r,A HREF=\, location, \, location, /A, NULL);
  
  
  


cvs commit: apache/src CHANGES mod_imap.c

1997-11-05 Thread dgaudet
dgaudet 97/11/05 03:43:15

  Modified:src  Tag: APACHE_1_2_X CHANGES mod_imap.c
  Log:
  mod_imap should DECLINE non-GET methods.
  
  Submitted by: Jay Bloodworth [EMAIL PROTECTED]
  Reviewed by:  Brian Behlendorf, Dean Gaudet, Ralf Engelschall
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.286.2.58 +3 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.286.2.57
  retrieving revision 1.286.2.58
  diff -u -r1.286.2.57 -r1.286.2.58
  --- CHANGES   1997/11/05 11:40:12 1.286.2.57
  +++ CHANGES   1997/11/05 11:43:13 1.286.2.58
  @@ -1,5 +1,8 @@
   Changes with Apache 1.2.5
   
  +  *) mod_imap should decline all non-GET methods.
  + [Jay Bloodworth [EMAIL PROTECTED]]
  +
 *) suexec.c wouldn't build without -DLOG_EXEC. [Jason A. Dour]
   
 *) mod_userdir was modifying r-finfo in cases where it wasn't setting
  
  
  
  1.21.2.2  +5 -1  apache/src/mod_imap.c
  
  Index: mod_imap.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_imap.c,v
  retrieving revision 1.21.2.1
  retrieving revision 1.21.2.2
  diff -u -r1.21.2.1 -r1.21.2.2
  --- mod_imap.c1997/08/01 08:48:17 1.21.2.1
  +++ mod_imap.c1997/11/05 11:43:14 1.21.2.2
  @@ -633,7 +633,11 @@
 char *imap_base = icr-imap_base ?
   icr-imap_base : IMAP_BASE_DEFAULT;
   
  -  FILE *imap = pfopen(r-pool, r-filename, r); 
  +  FILE *imap; 
  +
  +  if (r-method_number != M_GET) return DECLINED;
  +
  +  imap = pfopen(r-pool, r-filename, r); 
   
 if ( ! imap ) 
   return NOT_FOUND;
  
  
  


cvs commit: apache/src CHANGES mod_include.c

1997-11-05 Thread dgaudet
dgaudet 97/11/05 03:46:23

  Modified:src  Tag: APACHE_1_2_X CHANGES mod_include.c
  Log:
  fix bogus uninitialized data for  and ||
  
  PR:   1139
  Submitted by: Brian Slesinsky [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet, Roy Fielding, Ralf Engelschall
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.286.2.59 +3 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.286.2.58
  retrieving revision 1.286.2.59
  diff -u -r1.286.2.58 -r1.286.2.59
  --- CHANGES   1997/11/05 11:43:13 1.286.2.58
  +++ CHANGES   1997/11/05 11:46:20 1.286.2.59
  @@ -1,5 +1,8 @@
   Changes with Apache 1.2.5
   
  +  *) mod_include used uninitialized data for some uses of  and ||.
  + [Brian Slesinsky [EMAIL PROTECTED]] PR#1139
  +
 *) mod_imap should decline all non-GET methods.
[Jay Bloodworth [EMAIL PROTECTED]]
   
  
  
  
  1.33.2.7  +2 -0  apache/src/mod_include.c
  
  Index: mod_include.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_include.c,v
  retrieving revision 1.33.2.6
  retrieving revision 1.33.2.7
  diff -u -r1.33.2.6 -r1.33.2.7
  --- mod_include.c 1997/11/05 11:40:13 1.33.2.6
  +++ mod_include.c 1997/11/05 11:46:21 1.33.2.7
  @@ -1334,6 +1334,7 @@
   strncpy(current-left-token.value, buffer,
   MAX_STRING_LEN-1);
current-left-token.value[MAX_STRING_LEN-1] = '\0';
  +  current-left-value = (current-token.value[0] != '\0');
   current-left-done = 1;
   break;
 default:
  @@ -1349,6 +1350,7 @@
   strncpy(current-right-token.value, buffer,
   MAX_STRING_LEN-1);
current-right-token.value[MAX_STRING_LEN-1] = '\0';
  +  current-right-value = (current-token.value[0] != '\0');
   current-right-done = 1;
   break;
 default:
  
  
  


cvs commit: apache/src mod_negotiation.c

1997-11-05 Thread dgaudet
dgaudet 97/11/05 03:48:31

  Modified:src  Tag: APACHE_1_2_X mod_negotiation.c
  Log:
  Fix undefined C behaviour.
  
  Submitted by: Ben Laurie
  Reviewed by:  Dean Gaudet, Ralf Engelschall
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.40.2.3  +3 -2  apache/src/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_negotiation.c,v
  retrieving revision 1.40.2.2
  retrieving revision 1.40.2.3
  diff -u -r1.40.2.2 -r1.40.2.3
  --- mod_negotiation.c 1997/07/19 08:17:16 1.40.2.2
  +++ mod_negotiation.c 1997/11/05 11:48:30 1.40.2.3
  @@ -623,8 +623,9 @@
   {
   char *cp = header;
   
  -while (*cp  *cp != ':')
  -*cp++ = tolower(*cp);
  +for ( ; *cp  *cp != ':' ; ++cp) {
  +*cp = tolower(*cp);
  +}
   
   if (!*cp) {
log_reason (Syntax error in type map --- no ':', r-filename, r);
  
  
  


cvs commit: apachen/src/regex Makefile.tmpl .cvsignore mkh Makefile

1997-11-05 Thread dgaudet
dgaudet 97/11/05 04:48:26

  Modified:src  .cvsignore CHANGES Configure Makefile.tmpl
   src/main conf.h http_core.c http_main.c
   src/modules/proxy proxy_cache.c
   src/regex .cvsignore mkh
  Added:   src/helpers PrintPathOS2
   src/os/emx .cvsignore Makefile.tmpl os-inline.c os.c os.h
   src/regex Makefile.tmpl
  Removed: src/regex Makefile
  Log:
  OS/2 update.  It should now be possible to compile OS/2 from the same
  sources as Unix.
  
  Submitted by: Brian Havard [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet, Paul Sutton, Jim Jagielski
  
  Revision  ChangesPath
  1.10  +1 -0  apachen/src/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /export/home/cvs/apachen/src/.cvsignore,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- .cvsignore1997/08/25 02:12:26 1.9
  +++ .cvsignore1997/11/05 12:48:10 1.10
  @@ -1,3 +1,4 @@
  +Makefile
   *.dsw
   *.mdp
   *.ncb
  
  
  
  1.486 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.485
  retrieving revision 1.486
  diff -u -r1.485 -r1.486
  --- CHANGES   1997/11/05 11:23:21 1.485
  +++ CHANGES   1997/11/05 12:48:11 1.486
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b3
   
  +  *) OS/2 Port updated; it should be possible to build OS/2 from the same
  + sources as Unix now.  [Brian Havard [EMAIL PROTECTED]]
  +
 *) Fix a year formatting bug in mod_usertrack.
[Paul Eggert [EMAIL PROTECTED]] PR#1342
   
  
  
  
  1.168 +12 -8 apachen/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.167
  retrieving revision 1.168
  diff -u -r1.167 -r1.168
  --- Configure 1997/11/05 01:04:52 1.167
  +++ Configure 1997/11/05 12:48:12 1.168
  @@ -161,7 +161,10 @@
   DBM_LIB=-ldbm
   DB_LIB=-ldb
   SHELL=/bin/sh
  -if ./helpers/PrintPath -s ranlib; then
  +TARGET=httpd
  +PRINTPATH=PrintPath
  +
  +if ./helpers/$PRINTPATH -s ranlib; then
   RANLIB=ranlib
   else
   RANLIB=true
  @@ -235,8 +238,11 @@
DEF_WANTHSREGEX=yes
OS='EMX OS/2'
CFLAGS=$CFLAGS -Zbsd-signals -Zbin-files -DTCPIPV4 -g
  - LIBS=$LIBS -lsocket -llibufc -lbsd
  + LIBS=$LIBS -lsocket -lufc -lbsd
DBM_LIB=-lgdbm
  + TARGET=httpd.exe
  + SHELL=sh
  + PRINTPATH=PrintPathOS2
;;
   *-hi-hiux)
OS='HI-UX'
  @@ -595,7 +601,7 @@
for compilers in gcc cc acc c89
do
lookedfor=$lookedfor $compilers
  - if ./helpers/PrintPath -s $compilers; then
  + if ./helpers/$PRINTPATH -s $compilers; then
COMPILER=$compilers
break
fi
  @@ -990,6 +996,7 @@
   echo SHELL=$SHELL Makefile.config
   echo OSDIR=$OSDIR Makefile.config
   echo SUBDIRS=$SUBDIRS Makefile.config
  +echo TARGET=$TARGET  Makefile.config
   echo  Makefile.config
   echo  End of Configure created section  Makefile.config
   
  @@ -1022,7 +1029,7 @@
   #
   # directories to create makefiles in
   #
  -MAKEDIRS=support main $OSDIR
  +MAKEDIRS=support main regex $OSDIR
   for dir in $MAKEDIRS ; do
echo Creating Makefile in $dir
cat Makefile.config $dir/Makefile.tmpl  $dir/Makefile
  @@ -1037,10 +1044,7 @@
   default: all
   
   all clean :: 
  - for i in \$(MODULES); do \\
  -  (cd \$\$i; \\
  -   \$(MAKE) CC='\$(CC)' AUX_CFLAGS='\$(CFLAGS)' RANLIB='\$(RANLIB)' \$@) 
|| exit 1;\\
  - done
  + for i in \$(MODULES); do (cd \$\$i; \$(MAKE) CC='\$(CC)' 
AUX_CFLAGS='\$(CFLAGS)' RANLIB='\$(RANLIB)' \$@) || exit 1; done
   
   EOF
   
  
  
  
  1.70  +4 -4  apachen/src/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apachen/src/Makefile.tmpl,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Makefile.tmpl 1997/10/15 20:30:02 1.69
  +++ Makefile.tmpl 1997/11/05 12:48:13 1.70
  @@ -17,7 +17,7 @@
   .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $
   
  -all: @@Configuration@@ httpd
  +all: @@Configuration@@ $(TARGET)
   
   @@Configuration@@: Configuration.tmpl
@echo @@Configuration@@ older than Configuration.tmpl, or doesn't 
exist.
  @@ -26,11 +26,11 @@
@echo If not, you will at least have to touch @@Configuration@@.
@false
   
  -httpd:  subdirs modules.o
  +$(TARGET):  subdirs modules.o
rm -f buildmark.c
echo 'const char SERVER_BUILT[] = '`date`';'  buildmark.c
$(CC) -c $(CFLAGS) buildmark.c
  - $(CC) $(CFLAGS) $(LDFLAGS)  -o httpd

cvs commit: apachen/src/main conf.h http_main.c

1997-11-06 Thread dgaudet
dgaudet 97/11/06 02:47:03

  Modified:src  CHANGES
   src/main conf.h http_main.c
  Log:
  Papa Roy said I could commit this.  Fix USE_PTHREAD_SERIALIZED_ACCEPT, I
  totally didn't do it right the first time.
  
  Reviewed by:  Roy Fielding
  
  Revision  ChangesPath
  1.488 +3 -6  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.487
  retrieving revision 1.488
  diff -u -r1.487 -r1.488
  --- CHANGES   1997/11/06 03:03:08 1.487
  +++ CHANGES   1997/11/06 10:46:58 1.488
  @@ -1,10 +1,7 @@
   Changes with Apache 1.3b3
  -
  -  *) Restored USE_FCNTL_SERIALIZED_ACCEPT as the default for Solaris2,
  - since the PTHREAD mechanism was losing locks on Solaris 2.5.0.
  - You can now set -DUSE_SYSVSEM_SERIALIZED_ACCEPT or
  - -DUSE_PTHREAD_SERIALIZED_ACCEPT in Configuration if you want to
  - test the other two methods.  [Roy Fielding]
  +  
  +  *) Solaris = 2.5 was totally broken due to a mess up using pthread
  + mutexes.  [Roy Fielding, Dean Gaudet]
   
 *) OS/2 Port updated; it should be possible to build OS/2 from the same
sources as Unix now.  [Brian Havard [EMAIL PROTECTED]]
  
  
  
  1.153 +2 -2  apachen/src/main/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.152
  retrieving revision 1.153
  diff -u -r1.152 -r1.153
  --- conf.h1997/11/06 02:57:23 1.152
  +++ conf.h1997/11/06 10:47:00 1.153
  @@ -125,8 +125,8 @@
   #define HAVE_SYS_RESOURCE_H
   #define bzero(a,b) memset(a,0,b)
   #if !defined(USE_SYSVSEM_SERIALIZED_ACCEPT)  \
  -!defined(USE_PTHREAD_SERIALIZED_ACCEPT)
  -#define USE_FCNTL_SERIALIZED_ACCEPT
  +!defined(USE_FCNTL_SERIALIZED_ACCEPT)
  +#define USE_PTHREAD_SERIALIZED_ACCEPT
   #endif
   #define NEED_UNION_SEMUN
   #define HAVE_MMAP
  
  
  
  1.245 +47 -3 apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.244
  retrieving revision 1.245
  diff -u -r1.244 -r1.245
  --- http_main.c   1997/11/05 12:48:17 1.244
  +++ http_main.c   1997/11/06 10:47:01 1.245
  @@ -333,18 +333,33 @@
   #elif defined (USE_PTHREAD_SERIALIZED_ACCEPT)
   
   /* This code probably only works on Solaris ... but it works really fast
  - * on Solaris
  + * on Solaris.  Note that pthread mutexes are *NOT* released when a task
  + * dies ... the task has to free it itself.  So we block signals and
  + * try to be nice about releasing the mutex.
*/
   
   #include pthread.h
   
  -static pthread_mutex_t *accept_mutex;
  +static pthread_mutex_t *accept_mutex = (void *)(caddr_t) -1;
  +static int have_accept_mutex;
  +static sigset_t accept_block_mask;
  +static sigset_t accept_previous_mask;
  +
  +static void accept_mutex_child_cleanup(void *data)
  +{
  +if (accept_mutex != (void *)(caddr_t)-1
  +  have_accept_mutex) {
  + pthread_mutex_unlock(accept_mutex);
  +}
  +}
   
   static void accept_mutex_cleanup(void)
   {
  -if (munmap((caddr_t) accept_mutex, sizeof(*accept_mutex))) {
  +if (accept_mutex != (void *)(caddr_t)-1
  +  munmap((caddr_t) accept_mutex, sizeof(*accept_mutex))) {
perror(munmap);
   }
  +accept_mutex = (void *)(caddr_t)-1;
   }
   
   static void accept_mutex_init(pool *p)
  @@ -376,14 +391,25 @@
perror(pthread_mutex_init);
exit(1);
   }
  +sigfillset(accept_block_mask);
  +sigdelset(accept_block_mask, SIGHUP);
  +sigdelset(accept_block_mask, SIGTERM);
  +sigdelset(accept_block_mask, SIGUSR1);
  +register_cleanup(pconf, NULL, accept_mutex_child_cleanup,
  + accept_mutex_child_cleanup);
   }
   
   static void accept_mutex_on()
   {
  +if (sigprocmask(SIG_BLOCK, accept_block_mask, accept_previous_mask)) {
  + perror(sigprocmask(SIG_BLOCK));
  + exit (1);
  +}
   if (pthread_mutex_lock(accept_mutex)) {
perror(pthread_mutex_lock);
exit(1);
   }
  +have_accept_mutex = 1;
   }
   
   static void accept_mutex_off()
  @@ -391,6 +417,24 @@
   if (pthread_mutex_unlock(accept_mutex)) {
perror(pthread_mutex_unlock);
exit(1);
  +}
  +/* There is a slight race condition right here... if we were to die right
  + * now, we'd do another pthread_mutex_unlock.  Now, doing that would let
  + * another process into the mutex.  pthread mutexes are designed to be
  + * fast, as such they don't have protection for things like testing if 
the
  + * thread owning a mutex is actually unlocking it (or even any way of
  + * testing who owns the mutex).
  + *
  + * If we were to unset have_accept_mutex

cvs commit: apachen/src/modules/standard mod_cgi.c

1997-11-06 Thread dgaudet
dgaudet 97/11/06 13:54:15

  Modified:src/main alloc.c http_log.c http_main.c httpd.h
   src/modules/standard mod_cgi.c
  Log:
  Commit the RAISE_SIGSTOP debugging support.
  
  Reviewed by:  Jim Jagielski, Martin Kraemer
  
  Revision  ChangesPath
  1.57  +1 -0  apachen/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/alloc.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- alloc.c   1997/11/01 21:13:20 1.56
  +++ alloc.c   1997/11/06 21:54:07 1.57
  @@ -1361,6 +1361,7 @@
   
   if (!pid) {
/* Child process */
  + RAISE_SIGSTOP(SPAWN_CHILD);
   
if (pipe_out) {
close(out_fds[0]);
  
  
  
  1.43  +1 -0  apachen/src/main/http_log.c
  
  Index: http_log.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_log.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- http_log.c1997/10/27 19:09:43 1.42
  +++ http_log.c1997/11/06 21:54:08 1.43
  @@ -413,6 +413,7 @@
/* XXX: need to check what open fds the logger is actually passed,
 * XXX: and CGIs for that matter ... cleanup_for_exec *should*
 * XXX: close all the relevant stuff, but hey, it could be broken. */
  + RAISE_SIGSTOP(PIPED_LOG_SPAWN);
/* we're now in the child */
close (STDIN_FILENO);
dup2 (pl-fds[0], STDIN_FILENO);
  
  
  
  1.246 +12 -1 apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.245
  retrieving revision 1.246
  diff -u -r1.245 -r1.246
  --- http_main.c   1997/11/06 10:47:01 1.245
  +++ http_main.c   1997/11/06 21:54:10 1.246
  @@ -223,6 +223,10 @@
   
   int one_process = 0;
   
  +#ifdef DEBUG_SIGSTOP
  +int raise_sigstop_flags;
  +#endif
  +
   #ifndef NO_OTHER_CHILD
   /* used to maintain list of children which aren't part of the scoreboard */
   typedef struct other_child_rec other_child_rec;
  @@ -2144,6 +2148,7 @@
fprintf(stderr, httpd: unable to fork new process\n);
exit(1);
   }
  +RAISE_SIGSTOP(DETACH);
   #endif
   #ifndef NO_SETSID
   if ((pgrp = setsid()) == -1) {
  @@ -2983,6 +2988,7 @@
   }
   
   if (!pid) {
  + RAISE_SIGSTOP(MAKE_CHILD);
/* Disable the restart signal handlers and enable the just_die stuff.
 * Note that since restart() just notes that a restart has been
 * requested there's no race condition here.
  @@ -3424,7 +3430,7 @@
   
   setup_prelinked_modules();
   
  -while ((c = getopt(argc, argv, Xd:f:vhl)) != -1) {
  +while ((c = getopt(argc, argv, Xd:f:vhlZ:)) != -1) {
switch (c) {
case 'd':
strncpy(server_root, optarg, sizeof(server_root) - 1);
  @@ -3446,6 +3452,11 @@
case 'X':
++one_process;  /* Weird debugging mode. */
break;
  +#ifdef DEBUG_SIGSTOP
  + case 'Z':
  + raise_sigstop_flags = atoi(optarg);
  + break;
  +#endif
case '?':
usage(argv[0]);
}
  
  
  
  1.166 +20 -0 apachen/src/main/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/httpd.h,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- httpd.h   1997/10/26 21:57:13 1.165
  +++ httpd.h   1997/11/06 21:54:11 1.166
  @@ -903,3 +903,23 @@
   #if !defined (MULTITHREAD)  (defined (HAVE_MMAP) || defined (HAVE_SHMGET))
   #define OPTIMIZE_TIMEOUTS
   #endif
  +
  +/* A set of flags which indicate places where the server should 
raise(SIGSTOP).
  + * This is useful for debugging, because you can then attach to that process
  + * with gdb and continue.  This is important in cases where one_process
  + * debugging isn't possible.
  + */
  +#define SIGSTOP_DETACH   1
  +#define SIGSTOP_MAKE_CHILD   2
  +#define SIGSTOP_SPAWN_CHILD  4
  +#define SIGSTOP_PIPED_LOG_SPAWN  8
  +#define SIGSTOP_CGI_CHILD16
  +
  +#ifdef DEBUG_SIGSTOP
  +extern int raise_sigstop_flags;
  +#define RAISE_SIGSTOP(x) do { \
  + if (raise_sigstop_flags  SIGSTOP_##x) raise(SIGSTOP);\
  +} while (0)
  +#else
  +#define RAISE_SIGSTOP(x)
  +#endif
  
  
  
  1.63  +1 -0  apachen/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- mod_cgi.c 1997/10/25 22:35:18 1.62
  +++ mod_cgi.c

cvs commit: apachen/src CHANGES Configure

1997-11-06 Thread dgaudet
dgaudet 97/11/06 13:57:39

  Modified:src  CHANGES Configure
  Log:
  A sed command in the Configure script pushed the edge of POSIXness,
  breaking on some systems
  
  PR: 1368
  Submitted by:   Bhaba R.Misra [EMAIL PROTECTED]
  Reviewed by:Dean Gaudet, Jim Jagielski, Martin Kraemer
  
  Revision  ChangesPath
  1.489 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.488
  retrieving revision 1.489
  diff -u -r1.488 -r1.489
  --- CHANGES   1997/11/06 10:46:58 1.488
  +++ CHANGES   1997/11/06 21:57:36 1.489
  @@ -1,4 +1,7 @@
   Changes with Apache 1.3b3
  +
  +  *) A sed command in the Configure script pushed the edge of POSIXness,
  + breaking on some systems.  [Bhaba R.Misra [EMAIL PROTECTED]] PR#1368
 
 *) Solaris = 2.5 was totally broken due to a mess up using pthread
mutexes.  [Roy Fielding, Dean Gaudet]
  
  
  
  1.169 +1 -1  apachen/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.168
  retrieving revision 1.169
  diff -u -r1.168 -r1.169
  --- Configure 1997/11/05 12:48:12 1.168
  +++ Configure 1997/11/06 21:57:37 1.169
  @@ -1063,7 +1063,7 @@
# it's responsible for the rest of its Makefile
:
else
  - basedir=`echo $moddir | sed 's/^[^/]*\///g'`
  + basedir=`echo $moddir | sed '[EMAIL PROTECTED]/]*/@@g'`
awk  $moddir/Makefile  $tmpfile '
BEGIN {
printf OBJS=
  
  
  


cvs commit: apachen/src/helpers PrintPathOS2

1997-11-06 Thread dgaudet
dgaudet 97/11/06 13:59:37

  Modified:src/helpers PrintPathOS2
  Log:
  * PrintPathOS2 uses $test_exec_flag without defining it...
 should it be '-x' or just '-r'?
  
  This fixes it up and also makes its output a bit more sensible by changing
  all the backslashes from the PATH to forward slashes (it was outputing
  a mixture of forward and back slashes, looked a bit funny...).
  
  Submitted by: Brian Havard [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet, Jim Jagielski, Martin Kraemer
  
  Revision  ChangesPath
  1.2   +3 -2  apachen/src/helpers/PrintPathOS2
  
  Index: PrintPathOS2
  ===
  RCS file: /export/home/cvs/apachen/src/helpers/PrintPathOS2,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PrintPathOS2  1997/11/05 12:48:15 1.1
  +++ PrintPathOS2  1997/11/06 21:59:36 1.2
  @@ -14,9 +14,10 @@
sed 's/^;/.;/
 s/;;/;.;/g
 s/;$/;./
  -  s/;/ /g' `
  +  s/;/ /g
  +  s//\\//g' `
   do
  -if [ $test_exec_flag $path/$1.exe ]  [ ! -d $path/$1.exe ]; then
  +if [ -r $path/$1.exe ]  [ ! -d $path/$1.exe ]; then
   if [ $echo = yes ]; then
echo $path/$1.exe
fi
  
  
  


cvs commit: apachen/src/main fnmatch.c

1997-11-06 Thread dgaudet
dgaudet 97/11/06 14:03:40

  Modified:src  CHANGES
   src/main fnmatch.c
  Log:
  Inherit a bugfix to fnmatch.c from FreeBSD sources.
  
  PR: 1311
  Obtained from:FreeBSD-current
  Submitted by:   [KOI8-R] áÎÄÒÅÊ þÅÒÎÏ× [EMAIL PROTECTED]
  Reviewed by:Dean Gaudet, Jim Jagielski, Martin Kraemer
  
  Revision  ChangesPath
  1.491 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.490
  retrieving revision 1.491
  diff -u -r1.490 -r1.491
  --- CHANGES   1997/11/06 22:00:35 1.490
  +++ CHANGES   1997/11/06 22:03:38 1.491
  @@ -1,4 +1,7 @@
   Changes with Apache 1.3b3
  +  
  +  *) Inherit a bugfix to fnmatch.c from FreeBSD sources.
  + [[KOI8-R] áÎÄÒÅÊ þÅÒÎÏ× [EMAIL PROTECTED]] PR#1311
   
 *) When a configuration parse complained about a bad directive,
the logger would use whatever (unrelated) value was in errno.
  
  
  
  1.5   +4 -0  apachen/src/main/fnmatch.c
  
  Index: fnmatch.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/fnmatch.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- fnmatch.c 1997/09/16 00:35:40 1.4
  +++ fnmatch.c 1997/11/06 22:03:40 1.5
  @@ -110,6 +110,10 @@
return (FNM_NOMATCH);
if (*string == '/'  flags  FNM_PATHNAME)
return (FNM_NOMATCH);
  + if (*string == '.'  (flags  FNM_PERIOD) 
  + (string == stringstart ||
  + ((flags  FNM_PATHNAME)  *(string - 1) == '/')))
  + return (FNM_NOMATCH);
if ((pattern =
 rangematch(pattern, *string, flags)) == NULL)
return (FNM_NOMATCH);
  
  
  


cvs commit: apachen/src/modules/standard mod_access.c

1997-11-08 Thread dgaudet
dgaudet 97/11/08 13:33:09

  Modified:src  CHANGES
   src/modules/standard mod_access.c
  Log:
  Fix a byte ordering problem in mod_access which prevented
  the old-style syntax (i.e. a.b.c. to match a class C)
  from working properly. [Dean Gaudet]
  
  PR:   1248, 1328, 1384
  Reviewed by:  Jim Jagielski, Lars Eilebrecht
  
  Revision  ChangesPath
  1.496 +4 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.495
  retrieving revision 1.496
  diff -u -r1.495 -r1.496
  --- CHANGES   1997/11/08 19:19:13 1.495
  +++ CHANGES   1997/11/08 21:33:07 1.496
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b3
   
  +  *) Fix a byte ordering problem in mod_access which prevented
  + the old-style syntax (i.e. a.b.c. to match a class C)
  + from working properly. [Dean Gaudet] PR#1248, 1328, 1384
  +
 *) Fix problem with USE_FLOCK_SERIALIZED_ACCEPT not working
properly. Each child needs to open the lockfile instead
of using the passed file-descriptor from the parent. PR#1056
  
  
  
  1.28  +15 -3 apachen/src/modules/standard/mod_access.c
  
  Index: mod_access.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_access.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_access.c  1997/10/22 20:30:11 1.27
  +++ mod_access.c  1997/11/08 21:33:09 1.28
  @@ -204,12 +204,14 @@
/* legacy syntax for ip addrs: a.b.c. == a.b.c.0/24 for example */
int shift;
char *t;
  + int octet;
   
a-type = T_IP;
/* parse components */
s = where;
a-x.ip.net = 0;
  - shift = 0;
  + a-x.ip.mask = 0;
  + shift = 24;
while (*s) {
t = s;
if (!isdigit(*t)) {
  @@ -226,11 +228,21 @@
a-type = T_FAIL;
return invalid ip address;
}
  - a-x.ip.net |= atoi(s)  shift;
  + if (shift  0) {
  + return invalid ip address, only 4 octets allowed;
  + }
  + octet = atoi(s);
  + if (octet  0 || octet  255) {
  + a-type = T_FAIL;
  + return each octet must be between 0 and 255 inclusive;
  + }
  + a-x.ip.net |= octet  shift;
a-x.ip.mask |= 0xFFUL  shift;
  - shift += 8;
s = t;
  + shift -= 8;
}
  + a-x.ip.net = ntohl(a-x.ip.net);
  + a-x.ip.mask = ntohl(a-x.ip.mask);
   }
   else {
a-type = T_HOST;
  
  
  


cvs commit: apachen/src/modules/proxy mod_proxy.c

1997-11-08 Thread dgaudet
dgaudet 97/11/08 13:39:13

  Modified:src  CHANGES
   src/main http_request.c
   src/modules/proxy mod_proxy.c
  Log:
  find_types() shouldn't be called if we just found a matching
  ProxyPass directive and set handler to 'proxy-server', because
  find_types() resets r-handler if we have an other
  handler (server-info, server-parsed, etc.) that will be invoked
  on the URI from the request.
  
  PR:   870
  Submitted by: Lars Eilebrecht
  Reviewed by:  Dean Gaudet, Martin Kraemer
  
  Revision  ChangesPath
  1.497 +6 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.496
  retrieving revision 1.497
  diff -u -r1.496 -r1.497
  --- CHANGES   1997/11/08 21:33:07 1.496
  +++ CHANGES   1997/11/08 21:39:07 1.497
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3b3
   
  +  *) Preserve handler value on ProxyPass'ed requests by not
  + calling find_types on a proxy'd request; fixes problems
  + where some ProxyPass'ed URLs weren't actually passed
  + to the proxy.
  + [Lars Eilebrecht] PR#870
  +
 *) Fix a byte ordering problem in mod_access which prevented
the old-style syntax (i.e. a.b.c. to match a class C)
from working properly. [Dean Gaudet] PR#1248, 1328, 1384
  
  
  
  1.92  +5 -4  apachen/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_request.c,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- http_request.c1997/10/22 20:29:44 1.91
  +++ http_request.c1997/11/08 21:39:11 1.92
  @@ -1093,10 +1093,11 @@
   break;
   }
   
  -if ((access_status = find_types(r)) != 0) {
  -decl_die(access_status, find types, r);
  -return;
  -}
  +if (!r-proxyreq)
  +  if ((access_status = find_types(r)) != 0) {
  +  decl_die(access_status, find types, r);
  +  return;
  +  }
   
   if ((access_status = run_fixups(r)) != 0) {
   die(access_status, r);
  
  
  
  1.28  +2 -1  apachen/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_proxy.c   1997/10/22 20:30:04 1.27
  +++ mod_proxy.c   1997/11/08 21:39:12 1.28
  @@ -140,11 +140,12 @@
   
for (i = 0; i  conf-aliases-nelts; i++) {
len = alias_match(r-uri, ent[i].fake);
  -
  + 
if (len  0) {
r-filename = pstrcat(r-pool, proxy:, ent[i].real,
  r-uri + len, NULL);
r-handler = proxy-server;
  + r-proxyreq = 1;
return OK;
}
}
  
  
  


cvs commit: apachen/src/main http_core.c

1997-11-08 Thread dgaudet
dgaudet 97/11/08 13:42:37

  Modified:src  CHANGES
   src/main http_core.c
  Log:
  Fix a logic error when issuing a mmap error with non-zero MMAP_THRESHOLD.
  
  PR:   1294
  Submitted by: David Chambers [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet, Jim Jagielski
  
  Revision  ChangesPath
  1.498 +4 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.497
  retrieving revision 1.498
  diff -u -r1.497 -r1.498
  --- CHANGES   1997/11/08 21:39:07 1.497
  +++ CHANGES   1997/11/08 21:42:33 1.498
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b3
   
  +  *) Fix logic error when issuing a mmap() failed message
  + with a non-zero MMAP_THRESHOLD.
  + [David Chambers [EMAIL PROTECTED]] PR#1294
  +
 *) Preserve handler value on ProxyPass'ed requests by not
calling find_types on a proxy'd request; fixes problems
where some ProxyPass'ed URLs weren't actually passed
  
  
  
  1.135 +4 -2  apachen/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.134
  retrieving revision 1.135
  diff -u -r1.134 -r1.135
  --- http_core.c   1997/11/05 12:48:16 1.134
  +++ http_core.c   1997/11/08 21:42:36 1.135
  @@ -1756,8 +1756,10 @@
   if (mm == (caddr_t)-1) {
unblock_alarms();
   
  - aplog_error(APLOG_MARK, APLOG_CRIT, r-server,
  - mmap_handler: mmap failed: %s, r-filename);
  + if (r-finfo.st_size = MMAP_THRESHOLD) {
  + aplog_error(APLOG_MARK, APLOG_CRIT, r-server,
  + mmap_handler: mmap failed: %s, r-filename);
  + }
   #endif
   
if (d-content_md5  1) {
  
  
  


cvs commit: apachen/src/main conf.h

1997-11-08 Thread dgaudet
dgaudet 97/11/08 13:47:35

  Modified:src  CHANGES Configure
   src/main conf.h
  Log:
  Update the LynxOS port.
  
  Submitted by: Marius Groeger [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet, Paul Sutton
  
  Revision  ChangesPath
  1.499 +2 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.498
  retrieving revision 1.499
  diff -u -r1.498 -r1.499
  --- CHANGES   1997/11/08 21:42:33 1.498
  +++ CHANGES   1997/11/08 21:47:32 1.499
  @@ -1,5 +1,7 @@
   Changes with Apache 1.3b3
   
  +  *) PORT: Update the LynxOS port.  [Marius Groeger [EMAIL PROTECTED]]
  +
 *) Fix logic error when issuing a mmap() failed message
with a non-zero MMAP_THRESHOLD.
[David Chambers [EMAIL PROTECTED]] PR#1294
  
  
  
  1.170 +6 -4  apachen/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.169
  retrieving revision 1.170
  diff -u -r1.169 -r1.170
  --- Configure 1997/11/06 21:57:37 1.169
  +++ Configure 1997/11/08 21:47:33 1.170
  @@ -318,10 +318,12 @@
OS='Linux'
CFLAGS=$CFLAGS -DLINUX=1
;;
  -*-lynx-lynxos*)
  - OS='LynxOS'
  - CFLAGS=$CFLAGS -DLYNXOS
  - LIBS=$LIBS -lbsd -ldes -lc_p
  +*-lynx-lynxos)
  + OS='LynxOS 2.x'
  + CFLAGS=$CFLAGS -D__NO_INCLUDE_WARN__ -DLYNXOS
  + LIBS=$LIBS -lbsd -lcrypt
  + LFLAGS=$LFLAGS
  + DEF_WANTHSREGEX=yes
;;
   *486-*-bsdi*)
OS='BSDI w/486'
  
  
  
  1.155 +17 -3 apachen/src/main/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- conf.h1997/11/08 01:13:29 1.154
  +++ conf.h1997/11/08 21:47:34 1.155
  @@ -510,11 +510,25 @@
   #define HAVE_SYSLOG
   
   #elif defined(LYNXOS)
  +#undef HAVE_GMTOFF
  +#define HAVE_RESOURCE
  +#undef HAVE_MMAP
  +#undef HAVE_SHMGET
  +#undef HAVE_CRYPT_H
  +#undef HAVE_SYS_SELECT_H
  +#define HAVE_SYS_RESOURCE_H
  +#undef HAVE_SNPRINTF
  +#undef USE_FCNTL_SERIALIZED_ACCEPT
  +#undef USE_FLOCK_SERIALIZED_ACCEPT
  +#define USE_LONGJMP
  +#undef NO_UNISTD_H
   #undef NO_KILLPG
   #undef NO_SETSID
  -#define NEED_STRCASECMP
  -#define NEED_STRNCASECMP
  -#define NEED_INITGROUPS
  +#undef NO_USE_SIGACTION
  +#undef NO_LINGCLOSE
  +#define HAVE_CVT
  +extern char *crypt(char *pw, char *salt);
  +typedef int rlim_t;
   #define HAVE_SYSLOG
   
   #elif defined(UXPDS)
  
  
  


cvs commit: apachen/src/test time-sem.c

1997-11-10 Thread dgaudet
dgaudet 97/11/09 17:47:50

  Modified:src/test time-sem.c
  Log:
  Yet more updates.  It now works on linux again (I lost the old version which
  runs under linux).  It includes the correct flock() code.  It attempts to
  yield its slice up to other processes ...
  
  Revision  ChangesPath
  1.4   +141 -24   apachen/src/test/time-sem.c
  
  Index: time-sem.c
  ===
  RCS file: /export/home/cvs/apachen/src/test/time-sem.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- time-sem.c1997/11/04 08:33:13 1.3
  +++ time-sem.c1997/11/10 01:47:49 1.4
  @@ -15,7 +15,11 @@
We're not sure what the tunable is, so there's a define
NO_SEM_UNDO which can be used to simulate us trapping/blocking
signals to be able to properly release the semaphore on a clean
  - child death.
  + child death.  You'll also need to define NEED_UNION_SEMUN
  + under solaris.
  +
  +You'll need to define HAVE_SHMGET if anonymous shared mmap() doesn't
  +work on your system (i.e. linux).
   
   argv[1] is the #children, argv[2] is the #iterations per child
   
  @@ -55,6 +59,9 @@
   
   static int fcntl_fd=-1;
   
  +#define accept_mutex_child_init()
  +#define accept_mutex_cleanup()
  +
   /*
* Initialize mutex lock.
* Must be safe to call this on a restart.
  @@ -113,23 +120,37 @@
   
   static int flock_fd=-1;
   
  +#define FNAME test-lock-thing
  +
   /*
* Initialize mutex lock.
* Must be safe to call this on a restart.
*/
  -void
  -accept_mutex_init(void)
  +void accept_mutex_init(void)
   {
   
  -printf(opening test-lock-thing in current directory\n);
  -flock_fd = open(test-lock-thing, O_CREAT | O_WRONLY | O_EXCL, 0644);
  +printf(opening  FNAME  in current directory\n);
  +flock_fd = open(FNAME, O_CREAT | O_WRONLY | O_EXCL, 0644);
   if (flock_fd == -1)
   {
perror (open);
fprintf (stderr, Cannot open lock file: %s\n, test-lock-thing);
exit (1);
   }
  -unlink(test-lock-thing);
  +}
  +
  +void accept_mutex_child_init(void)
  +{
  +flock_fd = open(FNAME, O_WRONLY, 0600);
  +if (flock_fd == -1) {
  + perror(open);
  + exit(1);
  +}
  +}
  +
  +void accept_mutex_cleanup(void)
  +{
  +unlink(FNAME);
   }
   
   void accept_mutex_on(void)
  @@ -166,13 +187,19 @@
   static sigset_t accept_previous_mask;
   #endif
   
  +#define accept_mutex_child_init()
  +#define accept_mutex_cleanup()
  +
   void accept_mutex_init(void)
   {
  -  union semun {
  -   int val;
  -   struct semid_ds *buf;
  -   ushort *array;
  -  };
  +#ifdef NEED_UNION_SEMUN
  +/* believe it or not, you need to define this under solaris */
  +union semun {
  + int val;
  + struct semid_ds *buf;
  + ushort *array;
  +};
  +#endif
   
   union semun ick;
   
  @@ -251,6 +278,9 @@
   static sigset_t accept_block_mask;
   static sigset_t accept_previous_mask;
   
  +#define accept_mutex_child_init()
  +#define accept_mutex_cleanup()
  +
   void accept_mutex_init(void)
   {
   pthread_mutexattr_t mattr;
  @@ -311,9 +341,15 @@
   }
   
   #elif defined (USE_USLOCK_SERIALIZED_ACCEPT)
  +
   #include ulocks.h
  +
   static usptr_t *us = NULL;
   static ulock_t uslock = NULL;
  +
  +#define accept_mutex_child_init()
  +#define accept_mutex_cleanup()
  +
   void accept_mutex_init(void)
   {
   ptrdiff_t old;
  @@ -364,6 +400,94 @@
   #endif
   
   
  +#ifndef HAVE_SHMGET
  +static void *get_shared_mem(size_t size)
  +{
  +int fd;
  +void *result;
  +
  +/* allocate shared memory for the shared_counter */
  +fd = open (/dev/zero, O_RDWR);
  +if (fd == -1) {
  + perror (open);
  + exit (1);
  +}
  +result = (unsigned long *)mmap ((caddr_t)0, size,
  + PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
  +if (result == (void *)(caddr_t)-1) {
  + perror (mmap);
  + exit (1);
  +}
  +close (fd);
  +return result;
  +}
  +#else
  +#include sys/types.h
  +#include sys/ipc.h
  +#include sys/shm.h
  +
  +static void *get_shared_mem(size_t size)
  +{
  +key_t shmkey = IPC_PRIVATE;
  +int shmid = -1;
  +void *result;
  +#ifdef MOVEBREAK
  +char *obrk;
  +#endif
  +
  +if ((shmid = shmget(shmkey, size, IPC_CREAT | SHM_R | SHM_W)) == -1) {
  + perror(shmget);
  + exit(1);
  +}
  +
  +#ifdef MOVEBREAK
  +/*
  + * Some SysV systems place the shared segment WAY too close
  + * to the dynamic memory break point (sbrk(0)). This severely
  + * limits the use of malloc/sbrk in the program since sbrk will
  + * refuse to move past that point.
  + *
  + * To get around this, we move the break point way up there,
  + * attach the segment and then move break back down. Ugly
  + */
  +if ((obrk = sbrk(MOVEBREAK

cvs commit: apachen/src/test zb.c

1997-11-10 Thread dgaudet
dgaudet 97/11/09 17:55:48

  Added:   src/test zb.c
  Log:
  Add zeusbench since the zeus folks seem to have removed it from their
  pages.  It's freely distributable provided we leave the copyright intact
  at the top of the code.
  
  Revision  ChangesPath
  1.1  apachen/src/test/zb.c
  
  Index: zb.c
  ===
  
  /*  ZeusBench V1.0
==
  
  This program is Copyright (C) Zeus Technology Limited 1996.
  
  This program may be used and copied freely providing this copyright notice
  is not removed.
  
  This software is provided as is and any express or implied waranties, 
  including but not limited to, the implied warranties of merchantability and
  fitness for a particular purpose are disclaimed.  In no event shall 
  Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, 
  exemplary, or consequential damaged (including, but not limited to, 
  procurement of substitute good or services; loss of use, data, or profits;
  or business interruption) however caused and on theory of liability.  Whether
  in contract, strict liability or tort (including negligence or otherwise) 
  arising in any way out of the use of this software, even if advised of the
  possibility of such damage 
  
   Written by Adam Twiss ([EMAIL PROTECTED]).  February 1996
  
  */
  
  #ifdef SUNOS
  /* for some reason my SunOS headers did not have these defined */
  extern char *optarg;
  extern int optind, opterr, optopt;
  #endif
  
  /* #include sys/filio.h*/
  
  #include sys/time.h 
  #include unistd.h
  #include stdlib.h
  #include stdio.h
  #include fcntl.h
  #include sys/socket.h
  #include netinet/in.h
  #include netdb.h 
  #include errno.h
  #include sys/ioctl.h
  #include string.h
  
  /* --- DEFINITIONS -- */
  
  /* good old state machine */
  #define STATE_UNCONNECTED 0
  #define STATE_CONNECTING  1
  #define STATE_READ2
  
  #define CBUFFSIZE   512
  
  struct connection 
  {
int fd;
int state;
int read;   /* amount of bytes read */
int bread;  /* amount of body read */
int length; /* Content-Length value used for keep-alive */
char cbuff[CBUFFSIZE];  /* a buffer to store server response header */
int cbx;/* offset in cbuffer */
int keepalive;  /* non-zero if a keep-alive request */
int gotheader;  /* non-zero if we have the entire header in cbuff */
struct timeval start, connect, done; 
  };
  
  struct data 
  {
int read;  /* number of bytes read */
int ctime; /* time in ms to connect */
int time;  /* time in ms for connection */
  };
  
  #define min(a,b) ((a)(b))?(a):(b)
  #define max(a,b) ((a)(b))?(a):(b)
  
  /* - GLOBALS  */
  
  int requests = 1;  /* Number of requests to make */
  int concurrency = 1;   /* Number of multiple requests to make */
  int tlimit = 0;/* time limit in cs */
  int keepalive = 0; /* try and do keepalive connections */
  char *machine; /* Machine name */
  char *file;/* file name to use */
  char server_name[80];  /* name that server reports */
  int port = 80; /* port to use */
  
  int doclen = 0;/* the length the document should be */
  int totalread = 0; /* total number of bytes read */
  int totalbread = 0;/* totoal amount of entity body read */
  int done=0;/* number of requests we have done */
  int doneka=0;  /* number of keep alive connections done */
  int good=0, bad=0; /* number of good and bad requests */
  
  /* store error cases */
  int err_length = 0, err_conn = 0, err_except = 0;
  
  struct timeval start, end;
  
  /* global request (and its length) */
  char request[512];
  int reqlen;
  
  /* one global throw-away buffer to read stuff into */
  char buffer[4096];
  
  struct connection *con;  /* connection array */
  struct data *stats;  /* date for each request */
  
  fd_set readbits, writebits;  /* bits for select */
  struct sockaddr_in server;   /* server addr structure */
  
  /* - */
  
  /* simple little function to perror and exit */
  
  static void err(char *s) 
  {
perror(s);
exit(errno);
  }
  
  /* - */
  
  /* write out request to a connection - assumes we can write 
 (small) request out in one go into our new socket buffer  */
  
  void write_request(struct connection *c)
  {
gettimeofday(c-connect,0);
write(c-fd,request, reqlen);  
c-state = STATE_READ;
FD_SET(c-fd, readbits);
FD_CLR(c-fd, writebits);
  }
  
  /* - */
  
  /* make an fd non blocking */
  
  void nonblock(int fd

cvs commit: apachen/src/test test-writev.c

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:03:40

  Added:   src/test test-writev.c
  Log:
  Another little ditty from my box of test programs.
  
  Revision  ChangesPath
  1.1  apachen/src/test/test-writev.c
  
  Index: test-writev.c
  ===
  /*
  test-writev: use this to figure out if your writev() does intelligent
  things on the network.  Some writev()s when given multiple buffers
  will break them up into multiple packets, which is a waste.
  
  Linux prior to 2.0.31 has this problem.
  
  Solaris 2.5, 2.5.1 doesn't appear to, 2.6 hasn't been tested.
  
  IRIX 5.3 doesn't have this problem.
  
  To use this you want to snoop the wire with tcpdump, and then run
  test-writev a.b.c.d port# ... against some TCP service on another
  box.  For example you can run it against port 80 on another server.
  You want to look to see how many data packets are sent, you're hoping
  only one of size 300 is sent.
  */
  
  #include stdio.h
  #include sys/types.h
  #include sys/socket.h
  #include netinet/in.h
  #include stdlib.h
  #include unistd.h
  #include arpa/inet.h
  #include sys/uio.h
  #include errno.h
  
  #ifndef INADDR_NONE
  #define INADDR_NONE (-1ul)
  #endif
  
  void main( int argc, char **argv )
  {
  struct sockaddr_in server_addr;
  int s;
  struct iovec vector[3];
  char buf[100];
  int i;
  const int just_say_no = 1;
  
  if( argc != 3 ) {
  usage:
fprintf( stderr, usage: test-writev a.b.c.d port#\n );
exit( 1 );
  }
  server_addr.sin_family = AF_INET;
  server_addr.sin_addr.s_addr = inet_addr( argv[1] );
  if( server_addr.sin_addr.s_addr == INADDR_NONE ) {
fprintf( stderr, bogus address\n );
goto usage;
  }
  server_addr.sin_port = htons( atoi( argv[2] ) );
  
  s = socket( AF_INET, SOCK_STREAM, 0 );
  if( s  0 ) {
perror(socket);
exit(1);
  }
  if( connect( s, (struct sockaddr *)server_addr, sizeof( server_addr ) )
!= 0 ) {
perror(connect);
exit(1);
  }
  
  if( setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)just_say_no,
sizeof(just_say_no)) != 0 ) {
perror( TCP_NODELAY );
exit(1);
  }
  /* now build up a two part writev and write it out */
  for( i = 0; i  sizeof( buf ); ++i ) {
buf[i] = 'x';
  }
  vector[0].iov_base = buf;
  vector[0].iov_len = sizeof(buf);
  vector[1].iov_base = buf;
  vector[1].iov_len = sizeof(buf);
  vector[2].iov_base = buf;
  vector[2].iov_len = sizeof(buf);
  
  i = writev( s, vector[0], 3 );
  fprintf( stdout, i=%d, errno=%d\n, i, errno );
  exit(0);
  }
  
  
  


cvs commit: apachen/src/test zb.c

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:06:03

  Modified:src/test zb.c
  Log:
  Update to v1.01.
  
  Obtained from:http://www.zeus.co.uk/misc/zb.c
  
  Revision  ChangesPath
  1.2   +74 -33apachen/src/test/zb.c
  
  Index: zb.c
  ===
  RCS file: /export/home/cvs/apachen/src/test/zb.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- zb.c  1997/11/10 01:55:47 1.1
  +++ zb.c  1997/11/10 02:06:02 1.2
  @@ -1,6 +1,6 @@
   
  -/*  ZeusBench V1.0
  - ==
  +/*  ZeusBench V1.01
  + ===
   
   This program is Copyright (C) Zeus Technology Limited 1996.
   
  @@ -16,21 +16,38 @@
   or business interruption) however caused and on theory of liability.  Whether
   in contract, strict liability or tort (including negligence or otherwise) 
   arising in any way out of the use of this software, even if advised of the
  -possibility of such damage 
  +possibility of such damage.
   
  - Written by Adam Twiss ([EMAIL PROTECTED]).  February 1996
  + Written by Adam Twiss ([EMAIL PROTECTED]).  March 1996
  +
  +Thanks to the following people for their input:
  +  Mike Belshe ([EMAIL PROTECTED]) 
  +  Michael Campanella ([EMAIL PROTECTED])
   
   */
   
  -#ifdef SUNOS
  -/* for some reason my SunOS headers did not have these defined */
  -extern char *optarg;
  -extern int optind, opterr, optopt;
  +/*  Notes on compiling --
  +
  +This should compile unmodified using gcc on HP-UX, FreeBSD, Linux,
  +IRIX, Solaris, AIX and Digital Unix (OSF).  On Solaris 2.x you will
  +need to compile with -lnsl -lsocket options.  If you have any
  +difficulties compiling then let me know.
  +
  +On SunOS 4.x.x you may need to compile with -DSUNOS4 to add the following 
  +two lines of code which appear not to exist in my SunOS headers */
  +
  +#ifdef SUNOS4
  +extern char *optarg; 
  +extern int optind, opterr, optopt;   
   #endif
   
  -/* #include sys/filio.h*/
  +/*   */
  +
  +/* affects include files on Solaris */
  +#define BSD_COMP
   
   #include sys/time.h 
  +#include sys/ioctl.h
   #include unistd.h
   #include stdlib.h
   #include stdio.h
  @@ -44,6 +61,9 @@
   
   /* --- DEFINITIONS -- */
   
  +/* maximum number of requests on a time limited test */
  +#define MAX_REQUESTS 5 
  +
   /* good old state machine */
   #define STATE_UNCONNECTED 0
   #define STATE_CONNECTING  1
  @@ -96,7 +116,7 @@
   /* store error cases */
   int err_length = 0, err_conn = 0, err_except = 0;
   
  -struct timeval start, end;
  +struct timeval start, endtime;
   
   /* global request (and its length) */
   char request[512];
  @@ -168,12 +188,12 @@
   {
 int timetaken;
 
  -  gettimeofday(end,0);
  -  timetaken = timedif(end, start);
  +  gettimeofday(endtime,0);
  +  timetaken = timedif(endtime, start);
 
 printf(\n---\n);
 printf(Server: %s\n, server_name);
  -  printf(Doucment Length:%d\n, doclen);  
  +  printf(Document Length:%d\n, doclen);  
 printf(Concurency Level:   %d\n, concurrency);
 printf(Time taken for tests:   %d.%03d seconds\n, 
 timetaken/1000, timetaken%1000);
  @@ -229,10 +249,13 @@
 c-keepalive = 0;
 c-cbx = 0; 
 c-gotheader = 0;
  +
 c-fd = socket(AF_INET, SOCK_STREAM, 0);
 if(c-fd0) err(socket);
  +
 nonblock(c-fd);
 gettimeofday(c-start,0);
  +
 if(connect(c-fd, (struct sockaddr *) server, sizeof(server))0) {
   if(errno==EINPROGRESS) {
 c-state = STATE_CONNECTING;
  @@ -260,19 +283,28 @@
   
   void close_connection(struct connection *c)
   {
  -  if(good==1) {
  -/* first time here */
  -doclen = c-bread;
  -  } else if(c-bread!=doclen) { bad++; err_length++; }
  -
  -  /* save out time */
  -  if(done  requests) {
  -struct data s;
  -gettimeofday(c-done,0);
  -s.read = c-read;
  -s.ctime = timedif(c-connect, c-start);
  -s.time = timedif(c-done, c-start);
  -stats[done++] = s;
  +  if(c-read == 0  c-keepalive) {
  +/* server has legitiamately shut down an idle keep alive request */
  +good--;  /* connection never happend */
  +  } 
  +  else {
  +if(good==1) {
  +  /* first time here */
  +  doclen = c-bread;
  +} else if (c-bread!=doclen) { 
  +  bad++; 
  +  err_length++; 
  +}
  +
  +/* save out time */
  +if(done  requests) {
  +  struct data s;
  +  gettimeofday(c-done,0);
  +  s.read = c-read;
  +  s.ctime = timedif(c-connect, c-start);
  +  s.time = timedif(c-done, c-start);
  +  stats[done++] = s;
  +}
 }
   
 close(c-fd);
  @@ -316,6 +348,7 @@
   /* this next line is so

cvs commit: apachen/src/test/vhtest - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:08:33

  apachen/src/test/vhtest - New directory


cvs commit: apachen/src/test/vhtest/bin - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:08:53

  apachen/src/test/vhtest/bin - New directory


cvs commit: apachen/src/test/vhtest/docroot - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:08:55

  apachen/src/test/vhtest/docroot - New directory


cvs commit: apachen/src/test/vhtest/logs - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:08:56

  apachen/src/test/vhtest/logs - New directory


cvs commit: apachen/src/test/vhtest/docroot/default2 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:42

  apachen/src/test/vhtest/docroot/default2 - New directory


cvs commit: apachen/src/test/vhtest/docroot/main - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:45

  apachen/src/test/vhtest/docroot/main - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost1 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:47

  apachen/src/test/vhtest/docroot/vhost1 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost4 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:51

  apachen/src/test/vhtest/docroot/vhost4 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost3 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:50

  apachen/src/test/vhtest/docroot/vhost3 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost2 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:49

  apachen/src/test/vhtest/docroot/vhost2 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost5 - New directory

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:09:52

  apachen/src/test/vhtest/docroot/vhost5 - New directory


cvs commit: apachen/src/test/vhtest/docroot/vhost5 vhost.txt

1997-11-10 Thread dgaudet
dgaudet 97/11/09 18:11:56

  Added:   src/test/vhtest README runtest
   src/test/vhtest/bin test1 test1d test2 test2d test3 test4
test5 test6 vhget
   src/test/vhtest/conf common.conf mime.types test1.conf
test1d.conf test2.conf test2d.conf test3.conf
test4.conf test5.conf test6.conf
   src/test/vhtest/docroot/default1 vhost.txt
   src/test/vhtest/docroot/default2 vhost.txt
   src/test/vhtest/docroot/default3 vhost.txt
   src/test/vhtest/docroot/main vhost.txt
   src/test/vhtest/docroot/vhost1 vhost.txt
   src/test/vhtest/docroot/vhost2 vhost.txt
   src/test/vhtest/docroot/vhost3 vhost.txt
   src/test/vhtest/docroot/vhost4 vhost.txt
   src/test/vhtest/docroot/vhost5 vhost.txt
  Log:
  add the vhost test suite
  
  Revision  ChangesPath
  1.1  apachen/src/test/vhtest/README
  
  Index: README
  ===
  This is a basic test of the virtual host functionality.
  
  At present it *does not test*:
  
  - ServerPath
  - VirtualHost DNS lookups (specifically, multiple A records is interesting)
  
  It does test the basic gear that uses ip addresses and ports to decide what
  ip-vhost or set of name-vhosts are to be considered.  It tests _default_
  behaviour with both explicit and wildcard ports.  It tests the precedence
  behaviour -- i.e. earlier vhosts have higher precedence than later vhosts.
  It has a basic ServerAlias test.
  
  It also tests some error conditions.
  
  These tests are white box tests, i.e. I know how the code is written and
  I'm testing very specific cases within the code.  Black box tests would
  be nice too.
  
  To use:
  
  cd conf
  perl -pi.orig -e s#/home/dgaudet/ap/vhtest#`pwd`# *.conf
  cd ..
  ./runtest /path/to/httpd
  
  Or to run a specific test:
  
  ./runtest /path/to/httpd test3
  
  The output looks something like:
  
  127.0.0.1:8080   ''   'vhost1'   : passed
  127.0.0.1:8080   'vhost1:8080''vhost1'   : passed
  127.0.0.1:8080   'vhost2:8080''vhost1'   : passed
  127.0.0.1:8081   ''   'vhost2'   : passed
  127.0.0.1:8081   'vhost2:8081''vhost2'   : passed
  127.0.0.1:8081   'vhost1:8081''vhost2'   : passed
  127.0.0.2:8080   ''   'vhost3'   : passed
  
  The first column is the ipaddr:port connected to.  The second column is
  the Host: header sent ('' means no Host: header sent).  The third column
  is the vhost expected.
  
  It probably only works on Linux because it uses the loopback interface for
  all tests -- and Linux lo0 responds to *all* addresses in 127/8 rather than
  just 127.0.0.1.  You'd probably have to add the following aliases to other
  boxes:
  
  127.0.0.2
  127.0.0.3
  127.0.0.4
  127.0.0.5
  
  Dean
  
  
  
  1.1  apachen/src/test/vhtest/runtest
  
  Index: runtest
  ===
  #!/bin/sh
  
  if [ $# -lt 1 ]; then
  echo usage: runtest /path/to/httpd 12
  exit 1
  fi;
  
  httpd=$1
  shift
  pwd=`pwd`
  
  
  if [ $# = 0 ]; then
  list=conf/test*.conf
  else
  list=$*
  fi
  
  pid=0
  exitcode=0
  trap 'kill $pid /dev/null 21; exit $exitcode' 0 1 2 3 15
  
  for i in $list; do
  j=`echo $i | sed -e 's#.*/##' -e 's#\.conf$##'`
  echo ''
  echo  $j 
  f=$pwd/conf/$j.conf
  grep '^##' $f
  $httpd -f $f
  # such a pain to wait for the pid file to be created
  sleep 1
  pid=`cat logs/httpd.pid`
  
  sh bin/$j
  
  # such a pain to know if it has finished
  kill $pid
  sleep 1
  while kill -0 $pid /dev/null 21; do
sleep 1
  done
  done
  
  
  
  1.1  apachen/src/test/vhtest/bin/test1
  
  Index: test1
  ===
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost1
  
  bin/vhget 127.0.0.2 8080 '' vhost2
  bin/vhget 127.0.0.2 8080 vhost2:8080 vhost2
  bin/vhget 127.0.0.2 8080 vhost1:8080 vhost2
  
  bin/vhget 127.0.0.3 8080 '' vhost3
  bin/vhget 127.0.0.3 8080 vhost3:8080 vhost3
  bin/vhget 127.0.0.3 8080 vhost4:8080 vhost4
  
  bin/vhget 127.0.0.4 8080 '' main
  bin/vhget 127.0.0.4 8080 'vhost1' main
  bin/vhget 127.0.0.4 8080 'vhost2' main
  
  
  
  1.1  apachen/src/test/vhtest/bin/test1d
  
  Index: test1d
  ===
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost1
  
  bin/vhget 127.0.0.2 8080 '' vhost2
  bin/vhget 127.0.0.2

cvs commit: apachen/src/main util.c

1997-11-11 Thread dgaudet
dgaudet 97/11/11 11:52:20

  Modified:src  CHANGES
   src/main util.c
  Log:
  If ap_slack fails to allocate above the low slack line it's a good
  indication that further problems will occur; it's a better indication
  than many external libraries give us when we actually run out of
  descriptors.  So report it to the user once per restart.
  
  PR:   1181
  Reviewed by:  Jim Jagielski, Ken Coar
  
  Revision  ChangesPath
  1.502 +6 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.501
  retrieving revision 1.502
  diff -u -r1.501 -r1.502
  --- CHANGES   1997/11/09 20:40:30 1.501
  +++ CHANGES   1997/11/11 19:52:16 1.502
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3b3
   
  +  *) If ap_slack fails to allocate above the low slack line it's a good
  + indication that further problems will occur; it's a better indication
  + than many external libraries give us when we actually run out of
  + descriptors.  So report it to the user once per restart.
  + [Dean Gaudet] PR#1181
  +
 *) Change mod_include and mod_autoindex to use Y2K-safe date formats
by default.  [Ken Coar]
   
  
  
  
  1.76  +15 -2 apachen/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/util.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- util.c1997/10/27 16:30:30 1.75
  +++ util.c1997/11/11 19:52:19 1.76
  @@ -66,9 +66,7 @@
   
   #include httpd.h
   #include http_conf_globals.h   /* for user_id  group_id */
  -#if defined(DEBUG)||defined(DEBUG_CFG_LINES)
   #include http_log.h
  -#endif
   #include stdio.h
   
   const char month_snames[12][4] =
  @@ -1620,6 +1618,7 @@
   #if !defined(F_DUPFD)
   return fd;
   #else
  +static int low_warned;
   int new_fd;
   
   #ifdef HIGH_SLACK_LINE
  @@ -1637,6 +1636,20 @@
   }
   new_fd = fcntl(fd, F_DUPFD, LOW_SLACK_LINE);
   if (new_fd == -1) {
  + if (!low_warned) {
  + /* Give them a warning here, because we really can't predict
  +  * how libraries and such are going to fail.  If we can't
  +  * do this F_DUPFD there's a good chance that apache has too
  +  * few descriptors available to it.  Note we don't warn on
  +  * the high line, because if it fails we'll eventually try
  +  * the low line...
  +  */
  + aplog_error(APLOG_MARK, APLOG_ERR, NULL,
  + unable to open a file descriptor above %u, 
  + you may need to increase the number of descriptors,
  + LOW_SLACK_LINE);
  + low_warned = 1;
  + }
return fd;
   }
   close(fd);
  
  
  


cvs commit: apachen/htdocs/manual/mod mod_cookies.html

1997-11-12 Thread dgaudet
dgaudet 97/11/11 17:50:04

  Modified:htdocs/manual/mod mod_cookies.html
  Log:
  typo
  
  Revision  ChangesPath
  1.6   +1 -1  apachen/htdocs/manual/mod/mod_cookies.html
  
  Index: mod_cookies.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/mod/mod_cookies.html,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_cookies.html  1997/11/11 22:38:36 1.5
  +++ mod_cookies.html  1997/11/12 01:50:04 1.6
  @@ -15,7 +15,7 @@
   !--#include virtual=header.html --
   H1 ALIGN=CENTERModule mod_cookies/h1
   
  -STRONGFONT COLOR=redThis modules is obsolete.  As of version
  +STRONGFONT COLOR=redThis module is obsolete.  As of version
   1.2 of Apache, it has been replaced with A HREF=mod_usertrack.html
   mod_usertrack/A.  /FONT/STRONG
   
  
  
  


cvs commit: apachen/htdocs/manual/vhosts ip-based.html

1997-11-12 Thread dgaudet
dgaudet 97/11/12 12:54:23

  Modified:htdocs/manual/vhosts ip-based.html
  Log:
  addition
  
  Revision  ChangesPath
  1.2   +3 -1  apachen/htdocs/manual/vhosts/ip-based.html
  
  Index: ip-based.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/vhosts/ip-based.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ip-based.html 1997/11/11 23:47:21 1.1
  +++ ip-based.html 1997/11/12 20:54:22 1.2
  @@ -25,7 +25,9 @@
   different IP address for each IP-based virtual host/strong.
   This can be achieved by the machine having several physical network 
connections,
   or by use of virtual interfaces which are supported by most modern
  -operating systems (see system documentation for details).
  +operating systems (see system documentation for details, these are
  +frequently called ip aliases, and the ifconfig command
  +is most commonly used to set them up).
   
   h2How to set up Apache/h2
   There are two ways of configuring apache to support multiple hosts.
  
  
  


cvs commit: apachen/htdocs/manual/vhosts ip-based.html name-based.html

1997-11-12 Thread dgaudet
dgaudet 97/11/12 13:11:59

  Modified:htdocs/manual/vhosts ip-based.html name-based.html
  Log:
  Language tweaks.  Expand on the common reason why you would want to run
  multiple daemons.
  
  Revision  ChangesPath
  1.3   +19 -10apachen/htdocs/manual/vhosts/ip-based.html
  
  Index: ip-based.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/vhosts/ip-based.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ip-based.html 1997/11/12 20:54:22 1.2
  +++ ip-based.html 1997/11/12 21:11:58 1.3
  @@ -36,13 +36,22 @@
   p
   Use multiple daemons when:
   ul
  -liThe different virtual hosts need very different httpd configurations, 
such
  -   as different values for: A 
HREF=../mod/core.html#servertypeServerType/A,
  -   A HREF=../mod/core.html#userUser/A,
  -   A HREF=../mod/core.html#groupGroup/A,
  -   A HREF=../mod/mod_mime.html#typesconfigTypesConfig/A or
  -   A HREF=../mod/core.html#serverrootServerRoot/A.
  -liThe machine does not process a very high request rate.
  +liThere are security partitioning issues, such as company1 does not want
  +anyone at company2 to be able to read their data except via the web.
  +In this case you would need two daemons, each running with different
  +A HREF=../mod/core.html#userUser/A,
  +A HREF=../mod/core.html#groupGroup/A,
  +A HREF=../mod/core.html#listenListen/A, and
  +A HREF=../mod/core.html#serverrootServerRoot/A settings.
  +liYou can afford the memory and
  +a href=../misc/descriptors.htmlfile descriptor requirements/a of
  +listening to every IP alias on the machine.  It's only possible to
  +A HREF=../mod/core.html#listenListen/A
  +to the wildcard address, or to specific addresses.  So if you have
  +a need to listen to a specific address for whatever reason, then you
  +will need to listen to all specific addresses.  (Although one httpd
  +could listen to N-1 of the addresses, and another could listen to
  +the remaining address.)
   /ul
   Use a single daemon when:
   ul
  @@ -61,7 +70,7 @@
   Listen www.smallco.com:80
   /pre
   It is recommended that you use an IP address instead of a hostname
  -(see A HREF=../dns-caveats.htmlDNS page/A).
  +(see A HREF=../dns-caveats.htmlDNS caveats/A).
   
   h2Setting up a single daemon with virtual hosts/h2
   For this case, a single httpd will service requests for the main server
  @@ -95,7 +104,7 @@
   /pre
   
   It is recommended that you use an IP address instead of a hostname
  -(see A HREF=../dns-caveats.htmlDNS page/A).
  +(see A HREF=../dns-caveats.htmlDNS caveats/A).
   
   P
   
  @@ -114,7 +123,7 @@
   A HREF=../mod/core.html#namevirtualhostNameVirtualHost/A.
   P
   A HREF=../mod/core.html#userUser/A and
  -A HREF=../mod/core.html#groupGroup/A maybe used inside a VirtualHost
  +A HREF=../mod/core.html#groupGroup/A may be used inside a VirtualHost
   directive if the A HREF=../suexec.htmlsuEXEC wrapper/A is used.
   P
   
  
  
  
  1.2   +2 -2  apachen/htdocs/manual/vhosts/name-based.html
  
  Index: name-based.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/vhosts/name-based.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- name-based.html   1997/11/11 23:47:21 1.1
  +++ name-based.html   1997/11/12 21:11:59 1.2
  @@ -21,7 +21,7 @@
   
   h2Name-based vs. IP-based virtual hosts/h2
   
  -pWhile the approach with IP-based virtual hosts works still very well,
  +pWhile the approach with IP-based virtual hosts works very well,
   it is not the most elegant solution, because a dedicated IP address
   is needed for every virtual host and it is hard to implement on some
   machines. The codeHTTP/1.1/code protocol contains a method for the
  @@ -55,7 +55,7 @@
   pThe notable difference between IP-based and name-based virtual host
   configuration is the
   A HREF=../mod/core.html#namevirtualhostcodeNameVirtualHost/code/A
  -directive which specifies any IP address that should be used as a target for
  +directive which specifies an IP address that should be used as a target for
   name-based virtual hosts.
   
   pOf course, any additional directives can (and should) be placed
  
  
  


cvs commit: apachen/src/main alloc.c alloc.h http_main.c

1997-11-12 Thread dgaudet
dgaudet 97/11/12 15:22:09

  Modified:src  CHANGES
   src/main alloc.c alloc.h http_main.c
  Log:
  Create the pchild pool which is created before child_init and destroyed
  after child_exit.  This fixes a bug with reliable piped logs.
  
  Reviewed by:  Jim Jagielski, Roy Fielding
  
  Revision  ChangesPath
  1.507 +8 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.506
  retrieving revision 1.507
  diff -u -r1.506 -r1.507
  --- CHANGES   1997/11/12 21:37:43 1.506
  +++ CHANGES   1997/11/12 23:22:03 1.507
  @@ -1,5 +1,13 @@
   Changes with Apache 1.3b3
   
  +  *) It was necessary to distinguish between resources which are
  + allocated in the parent, for cleanup in the parent, and resources
  + which are allocated in each child, for cleanup in each child.
  + A new pool was created which is passed to the module child_init
  + and child_exit functions; modules are free to register per-child
  + cleanups there.  This fixes a bug with reliable piped logs.
  + [Dean Gaudet]
  +
 *) mod_autoindex wasn't displaying the ReadmeName file at the bottom
unless it was also doing FancyIndexes, but it displayed the
HeaderName file at the top under all circumstances.  It now shows
  
  
  
  1.58  +5 -0  apachen/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/alloc.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- alloc.c   1997/11/06 21:54:07 1.57
  +++ alloc.c   1997/11/12 23:22:05 1.58
  @@ -936,6 +936,11 @@
   #endif /* ndef WIN32 */
   }
   
  +API_EXPORT(void) null_cleanup(void *data)
  +{
  +/* do nothing cleanup routine */
  +}
  +
   /*
*
* Files and file descriptors; these are just an application of the
  
  
  
  1.37  +4 -0  apachen/src/main/alloc.h
  
  Index: alloc.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/alloc.h,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- alloc.h   1997/10/26 21:14:16 1.36
  +++ alloc.h   1997/11/12 23:22:06 1.37
  @@ -194,6 +194,10 @@
   API_EXPORT(void) kill_cleanup(pool *p, void *data, void (*plain_cleanup) 
(void *));
   API_EXPORT(void) run_cleanup(pool *p, void *data, void (*cleanup) (void *));
   
  +/* A do-nothing cleanup, for register_cleanup; it's faster to do
  + * things this way than to test for NULL. */
  +API_EXPORT(void) null_cleanup(void *data);
  +
   /* The time between when a resource is actually allocated, and when it
* its cleanup is registered is a critical section, during which the
* resource could leak if we got interrupted or timed out.  So, anything
  
  
  
  1.249 +55 -61apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.248
  retrieving revision 1.249
  diff -u -r1.248 -r1.249
  --- http_main.c   1997/11/11 22:50:13 1.248
  +++ http_main.c   1997/11/12 23:22:07 1.249
  @@ -240,8 +240,9 @@
   static other_child_rec *other_children;
   #endif
   
  -pool *pconf; /* Pool for config stuff */
  -pool *ptrans;/* Pool for per-transaction stuff */
  +static pool *pconf;  /* Pool for config stuff */
  +static pool *ptrans; /* Pool for per-transaction stuff */
  +static pool *pchild; /* Pool for httpd child stuff */
   
   int APACHE_TLS my_pid;   /* it seems silly to call getpid all 
the time */
   #ifndef MULTITHREAD
  @@ -278,8 +279,6 @@
   
   static ulock_t uslock = NULL;
   
  -#define accept_mutex_cleanup()
  -
   #define accept_mutex_child_init(x)
   
   static void accept_mutex_init(pool *p)
  @@ -351,7 +350,7 @@
   static sigset_t accept_block_mask;
   static sigset_t accept_previous_mask;
   
  -static void accept_mutex_child_cleanup(void *data)
  +static void accept_mutex_child_cleanup(void *foo)
   {
   if (accept_mutex != (void *)(caddr_t)-1
 have_accept_mutex) {
  @@ -359,7 +358,12 @@
   }
   }
   
  -static void accept_mutex_cleanup(void)
  +static void accept_mutex_child_init(pool *p)
  +{
  +register_cleanup(p, NULL, accept_mutex_child_cleanup, null_cleanup);
  +}
  +
  +static void accept_mutex_cleanup(void *foo)
   {
   if (accept_mutex != (void *)(caddr_t)-1
 munmap((caddr_t) accept_mutex, sizeof(*accept_mutex))) {
  @@ -368,8 +372,6 @@
   accept_mutex = (void *)(caddr_t)-1;
   }
   
  -#define accept_mutex_child_init(x)
  -
   static void accept_mutex_init(pool *p

cvs commit: apachen/src/main conf.h

1997-11-12 Thread dgaudet
dgaudet 97/11/12 15:26:14

  Modified:src  CHANGES
   src/main conf.h
  Log:
  Always define SUNOS_LIB_PROTOTYPES under SUNOS.
  
  Submitted by: Ben Hyde
  Reviewed by:  Dean Gaudet, Martin Kraemer
  
  Revision  ChangesPath
  1.508 +4 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.507
  retrieving revision 1.508
  diff -u -r1.507 -r1.508
  --- CHANGES   1997/11/12 23:22:03 1.507
  +++ CHANGES   1997/11/12 23:26:12 1.508
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b3
   
  +  *) PORT: SUNOS now always defines SUNOS_LIB_PROTOTYPES because a
  + recent change elsewhere left us without definitions for fgetc()
  + and fgets() breaking compilation.  [Martin Kraemer, Ben Hyde]
  +
 *) It was necessary to distinguish between resources which are
allocated in the parent, for cleanup in the parent, and resources
which are allocated in each child, for cleanup in each child.
  
  
  
  1.158 +5 -4  apachen/src/main/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.157
  retrieving revision 1.158
  diff -u -r1.157 -r1.158
  --- conf.h1997/11/11 23:04:15 1.157
  +++ conf.h1997/11/12 23:26:14 1.158
  @@ -117,6 +117,7 @@
   #define USE_FLOCK_SERIALIZED_ACCEPT
   #define NEED_DIFFTIME
   #define HAVE_SYSLOG
  +#define SUNOS_LIB_PROTOTYPES
   
   #elif defined(SOLARIS2)
   #undef HAVE_GMTOFF
  @@ -923,8 +924,8 @@
   
   int getopt(int, char **, char *);
   
  -int strcasecmp(char *, char *);
  -int strncasecmp(char *, char *, int);
  +int strcasecmp(const char *, const char *);
  +int strncasecmp(const char *, const char *, int);
   int toupper(int);
   int tolower(int);
   
  @@ -945,7 +946,7 @@
   void perror(char *);
   
   time_t time(time_t *);
  -int strftime(char *, int, char *, struct tm *);
  +int strftime(char *, int, const char *, struct tm *);
   
   int initgroups(char *, int);
   int wait3(int *, int, void *);   /* Close enough for us... */
  @@ -969,7 +970,7 @@
   void syslog(int, char *,...);
   char *mktemp(char *);
   
  -long vfprintf(FILE *, char *, va_list);
  +long vfprintf(FILE *, const char *, va_list);
   
   #endif /* SUNOS_LIB_PROTOTYPES */
   
  
  
  


cvs commit: apachen/htdocs/manual new_features_1_3.html

1997-11-12 Thread dgaudet
dgaudet 97/11/12 15:29:22

  Modified:htdocs/manual new_features_1_3.html
  Log:
  document pchild change
  
  Revision  ChangesPath
  1.33  +6 -1  apachen/htdocs/manual/new_features_1_3.html
  
  Index: new_features_1_3.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/new_features_1_3.html,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- new_features_1_3.html 1997/11/12 16:29:44 1.32
  +++ new_features_1_3.html 1997/11/12 23:29:18 1.33
  @@ -376,7 +376,12 @@
   listrongcodechild_exit/code function for module API/strongbr
   A new phase called once per heavy-weight process, when it is
   terminating.  Note that it can't be called in some fatal cases (such
  -as segfaults and kill -9).
  +as segfaults and kill -9).  The codechild_init/code and
  +codechild_exit/code functions are passed a pool whose lifetime is
  +the same as the lifetime of the child (modulo completely fatal
  +events in which apache has no hope of recovering).  In contrast,
  +the module codeinit/code function is passed a pool whose lifetime
  +ends when the parent exits or restarts.
   
   listrongcodechild_terminate/code/strongbr
   Used in the child to indicate the child should exit after finishing
  
  
  


cvs commit: apachen/src/main http_core.c

1997-11-15 Thread dgaudet
dgaudet 97/11/14 16:16:51

  Modified:htdocs/manual/mod core.html
   src/main http_core.c
  Log:
  Clean up check_cmd_context stuff.  Fix core documentation for a few
  directives.
  
  Reviewed by:  Jim Jagielski, Ken Coar, Martin Kraemer
  
  Revision  ChangesPath
  1.85  +3 -3  apachen/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/mod/core.html,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- core.html 1997/11/14 04:02:44 1.84
  +++ core.html 1997/11/15 00:16:48 1.85
  @@ -279,7 +279,7 @@
   !--%plaintext lt;?INDEX {\tt ContentDigest} directivegt; --
   strongSyntax:/strong ContentDigest emon|off/embr
   strongDefault:/strong codeContentDigest off/codebr
  -strongContext:/strong anybr
  +strongContext:/strong server config, virtual host, directory, 
.htaccessbr
   strongOverride:/strong AuthConfigbr
   strongStatus:/strong experimentalp
   strongCompatibility:/strong ContentDigest is only available in Apache 
1.1 and laterp
  @@ -689,7 +689,7 @@
   !--%plaintext lt;?INDEX {\tt HostNameLookups} directivegt; --
   strongSyntax:/strong HostNameLookups emon | off | double/embr
   strongDefault:/strong codeHostNameLookups off/codebr
  -strongContext:/strong server config, virtual hostbr
  +strongContext:/strong server config, virtual host, directory, 
.htaccessbr
   strongStatus:/strong corebr
   strongCompatibility:/strong codedouble/code available only in Apache
   1.3 and above.br
  @@ -729,7 +729,7 @@
   !--%plaintext lt;?INDEX {\tt IdentityCheck} directivegt; --
   strongSyntax:/strong IdentityCheck emboolean/embr
   strongDefault:/strong codeIdentityCheck off/codebr
  -strongContext:/strong server config, virtual hostbr
  +strongContext:/strong server config, virtual host, directory, 
.htaccessbr
   strongStatus:/strong corep
   
   This directive enables RFC1413-compliant logging of the remote user name
  
  
  
  1.140 +25 -24apachen/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.139
  retrieving revision 1.140
  diff -u -r1.139 -r1.140
  --- http_core.c   1997/11/13 15:00:10 1.139
  +++ http_core.c   1997/11/15 00:16:50 1.140
  @@ -568,6 +568,7 @@
   #define  NOT_IN_VIRTUALHOST 0x01U /* Virtualhost */
   #define  NOT_IN_LIMIT   0x02U /* Limit */
   #define  NOT_IN_DIR_LOC_FILE0x04U /* Directory/Location/Files*/
  +#define  GLOBAL_ONLY
(NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE)
   
   
   static const char *check_cmd_context(cmd_parms *cmd, unsigned forbidden)
  @@ -969,7 +970,7 @@
   
   void *new_file_conf = create_per_dir_config (cmd-pool);
   
  -const char *err = check_cmd_context(cmd, 
NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
  +const char *err = check_cmd_context(cmd, NOT_IN_LIMIT);
   if (err != NULL) return err;
   
   if (endp) *endp = '\0';
  @@ -1069,7 +1070,7 @@
   char *endp = strrchr (arg, '');
   pool *p = cmd-pool, *ptemp = cmd-temp_pool;
   
  -const char *err = check_cmd_context(cmd, 
NOT_IN_VIRTUALHOST|NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
  +const char *err = check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) return err;
   
   if (endp) *endp = '\0';
  @@ -1108,7 +1109,7 @@
   
   const char *add_module_command (cmd_parms *cmd, void *dummy, char *arg)
   {
  -const char *err = check_cmd_context(cmd, 
NOT_IN_VIRTUALHOST|NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
  +const char *err = check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) return err;
   
   if (add_named_module (arg))
  @@ -1118,7 +1119,7 @@
   
   const char *clear_module_list_command (cmd_parms *cmd, void *dummy)
   {
  -const char *err = check_cmd_context(cmd, 
NOT_IN_VIRTUALHOST|NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
  +const char *err = check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) return err;
   
   clear_module_list ();
  @@ -1141,7 +1142,7 @@
   
   const char *server_type (cmd_parms *cmd, void *dummy, char *arg)
   {
  -const char *err = check_cmd_context(cmd, 
NOT_IN_VIRTUALHOST|NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
  +const char *err = check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) return err;
   
   if (!strcasecmp (arg, inetd)) standalone = 0;
  @@ -1161,7 +1162,7 @@
   
   const char *set_send_buffer_size (cmd_parms *cmd, void *dummy, char *arg) {
   int s = atoi (arg);
  -const char *err = check_cmd_context(cmd, 
NOT_IN_VIRTUALHOST|NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
  +const char *err = check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) return err;
   
   if (s  512  s != 0) {
  @@ -1228,7 +1229,7 @@
   }
   
   const char *set_server_root (cmd_parms *cmd, void *dummy

cvs commit: apachen/htdocs/manual/misc known_bugs.html

1997-11-20 Thread dgaudet
dgaudet 97/11/20 09:26:37

  Modified:htdocs/manual/misc known_bugs.html
  Log:
  document the unknown error mmap bug
  
  Revision  ChangesPath
  1.36  +8 -0  apachen/htdocs/manual/misc/known_bugs.html
  
  Index: known_bugs.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/misc/known_bugs.html,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- known_bugs.html   1997/11/11 23:47:15 1.35
  +++ known_bugs.html   1997/11/20 17:26:36 1.36
  @@ -34,6 +34,14 @@
   and A HREF=known_client_problems.htmlour list of known client 
problems./A/P
   HR
   
  +H2Apache 1.3b3 Bugs/H2
  +
  +OL
  +LIThe error_log may contain (0)Unknown error: mmap_handler:
  +mmap failed errors.  Ignore them, it is a logic error and does not
  +indicate any problem.  This will be corrected in a later beta.
  +/OL
  +
   H2Apache 1.3b2 Bugs/H2
   
   H3Win32 only/H3
  
  
  


cvs commit: apachen/src/main http_core.c

1997-11-22 Thread dgaudet
dgaudet 97/11/21 17:59:58

  Modified:src  CHANGES
   src/main http_core.c
  Log:
  Fix the mmap_handler error messages again.
  
  Submitted by: Ben Hyde
  Reviewed by:  Dean Gaudet, Randy Terbush, Martin Kraemer
  
  Revision  ChangesPath
  1.517 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.516
  retrieving revision 1.517
  diff -u -r1.516 -r1.517
  --- CHANGES   1997/11/20 00:42:32 1.516
  +++ CHANGES   1997/11/22 01:59:54 1.517
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b4
   
  +  *) Fix the spurious (0)unknown error: mmap_handler: mmap failed
  + error messages. [Ben Hyde]
  +
   Changes with Apache 1.3b3
   
 *) WIN32: Work around brain-damaged spawn calls that can't deal
  
  
  
  1.141 +5 -6  apachen/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- http_core.c   1997/11/15 00:16:50 1.140
  +++ http_core.c   1997/11/22 01:59:57 1.141
  @@ -1864,21 +1864,20 @@
   block_alarms();
   if ((r-finfo.st_size = MMAP_THRESHOLD)
 ( !r-header_only || (d-content_md5  1))) {
  -  /* we need to protect ourselves in case we die while we've got the
  + /* we need to protect ourselves in case we die while we've got the
 * file mmapped */
mm = mmap (NULL, r-finfo.st_size, PROT_READ, MAP_PRIVATE,
fileno(f), 0);
  + if (mm == (caddr_t)-1) {
  + aplog_error(APLOG_MARK, APLOG_CRIT, r-server,
  + default_handler: mmap failed: %s, r-filename);
  + }
   } else {
mm = (caddr_t)-1;
   }
   
   if (mm == (caddr_t)-1) {
unblock_alarms();
  -
  - if (r-finfo.st_size = MMAP_THRESHOLD) {
  - aplog_error(APLOG_MARK, APLOG_CRIT, r-server,
  - mmap_handler: mmap failed: %s, r-filename);
  - }
   #endif
   
if (d-content_md5  1) {
  
  
  


cvs commit: apache/src http_request.c

1997-11-22 Thread dgaudet
dgaudet 97/11/22 14:24:53

  Modified:src  Tag: APACHE_1_2_X http_request.c
  Log:
  Comment was a little bit inaccurate.  Also explicitly mention 2068 S9,
  S14.23 in the error message so that maybe we can avoid more and more
  people complaining about us rejecting HTTP/1.1 requests without a Host:
  header.
  
  PR: 1454
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.50.2.8  +5 -2  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.50.2.7
  retrieving revision 1.50.2.8
  diff -u -r1.50.2.7 -r1.50.2.8
  --- http_request.c1997/08/11 14:20:03 1.50.2.7
  +++ http_request.c1997/11/22 22:24:52 1.50.2.8
  @@ -906,9 +906,12 @@
((r-proto_num == 1001)  !table_get(r-headers_in, Host))) {
   /* Client sent us a HTTP/1.1 or later request without telling
 * us the hostname, either with a full URL or a Host: header.
  -  * We therefore need to (as per the 1.1 spec) send an error
  +  * We therefore need to (as per the 1.1 spec) send an error.
  +  * As a special case, HTTP/1.1 mentions twice (S9, S14.23)
  +  * that a request MUST contain a Host: header, and the server
  +  * MUST respond with 400 if it doesn't.
 */
  -log_reason (client sent HTTP/1.1 request without hostname,
  +log_reason (client sent HTTP/1.1 request without hostname (see 
RFC2068 sections 9 and 14.23),
r-uri, r);
die (BAD_REQUEST, r);
return;
  
  
  


cvs commit: apachen/src CHANGES

1997-11-25 Thread dgaudet
dgaudet 97/11/25 13:36:52

  Modified:src  CHANGES
  Log:
  attribute the PR#1387 fix to Ben Hyde
  
  Revision  ChangesPath
  1.521 +1 -1  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.520
  retrieving revision 1.521
  diff -u -r1.520 -r1.521
  --- CHANGES   1997/11/25 20:43:30 1.520
  +++ CHANGES   1997/11/25 21:36:51 1.521
  @@ -1,7 +1,7 @@
   Changes with Apache 1.3b4
   
 *) WIN32: Allocate the correct amount of memory for the scoreboard.
  - [Dean Gaudet]
  + [Ben Hyde] PR#1387
   
 *) WIN32: Only lowercase the part of the path that is real. [Ben Laurie]
   
  
  
  


cvs commit: apachen/src/main http_config.c

1997-11-29 Thread dgaudet
dgaudet 97/11/28 21:51:53

  Modified:src/main http_config.c
  Log:
  style tweaks
  
  Revision  ChangesPath
  1.87  +2 -2  apachen/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_config.c,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- http_config.c 1997/11/27 16:10:45 1.86
  +++ http_config.c 1997/11/29 05:51:52 1.87
  @@ -811,7 +811,7 @@
else {
void *mconfig = get_module_config(config, mod);
void *sconfig =
  - get_module_config(parms-server-module_config, mod);
  + get_module_config(parms-server-module_config, mod);
   
if (!mconfig  mod-create_dir_config) {
mconfig = (*mod-create_dir_config) (parms-pool, parms-path);
  @@ -840,7 +840,7 @@
const char *errmsg = handle_command(parms, config, l);
   if (errmsg) {
return errmsg;
  -}
  + }
   }
   
   return NULL;
  
  
  


cvs commit: apachen/src/main http_core.c

1997-11-30 Thread dgaudet
dgaudet 97/11/30 11:18:47

  Modified:src/main http_core.c
  Log:
  Bump default MMAP_THRESHOLD to 1 from 0 because some systems don't allow
  mmap of size 0.
  
  PR:   1491
  Reviewed by:  Jim Jagielski, Ken Coar
  
  Revision  ChangesPath
  1.142 +4 -4  apachen/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- http_core.c   1997/11/22 01:59:57 1.141
  +++ http_core.c   1997/11/30 19:18:46 1.142
  @@ -75,15 +75,15 @@
* http://www.isi.edu/~johnh/SOFTWARE/APACHE/index.html.
*/
   
  -/* Files have to be at least this big before they're mmap()d.  This is to
  - * deal with systems where the expense of doing an mmap() and an munmap()
  - * outweighs the benefit for small files.
  +/* Files have to be at least this big before they're mmap()d.  This is to 
deal
  + * with systems where the expense of doing an mmap() and an munmap() 
outweighs
  + * the benefit for small files.  It shouldn't be set lower than 1.
*/
   #ifndef MMAP_THRESHOLD
   #ifdef SUNOS4
   #define MMAP_THRESHOLD   (8*1024)
   #else
  -#define MMAP_THRESHOLD   0
  +#define MMAP_THRESHOLD   1
   #endif
   #endif
   #endif
  
  
  


cvs commit: apachen/htdocs/manual/misc known_bugs.html

1997-12-04 Thread dgaudet
dgaudet 97/12/04 14:10:13

  Modified:htdocs/manual/misc known_bugs.html
  Log:
  solaris 2.6 is common enough, talk about the broken gcc
  
  Revision  ChangesPath
  1.39  +10 -0 apachen/htdocs/manual/misc/known_bugs.html
  
  Index: known_bugs.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/misc/known_bugs.html,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- known_bugs.html   1997/11/27 14:48:07 1.38
  +++ known_bugs.html   1997/12/04 22:10:09 1.39
  @@ -52,6 +52,16 @@
   CoreR\buildmark.obj/CODE (and similarly for CODEdel
   CoreD\buildmark.obj/CODE). See 
   A HREF=http://bugs.apache.org/index/full/1473;PR#1473/A.
  +LIbSolaris 2.6/b users may have troubles compiling the server with
  +gcc.  As is frequently the case with gcc compilation troubles, this
  +is the result of an improperly built gcc.  The gcc for solaris 2.6
  +found at a href=http://www.sunfreeware.com/;www.sunfreeware.com/a 
  +was built with a beta version of solaris 2.6.  The release version
  +has changed significantly enough that this version will not properly
  +work with it.  There are two workarounds mentioned in
  +a href=http://bugs.apache.org/index/full/1336;PR#1336/a.
  +bThis is not an Apache bug, and no code will be changed to deal with
  +it./b
   /OL
   
   H2Apache 1.3b2 Bugs/H2
  
  
  


cvs commit: apachen/htdocs/manual/misc known_bugs.html

1997-12-04 Thread dgaudet
dgaudet 97/12/04 14:22:48

  Modified:htdocs/manual/misc known_bugs.html
  Log:
  tweak
  
  Revision  ChangesPath
  1.40  +2 -2  apachen/htdocs/manual/misc/known_bugs.html
  
  Index: known_bugs.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/misc/known_bugs.html,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- known_bugs.html   1997/12/04 22:10:09 1.39
  +++ known_bugs.html   1997/12/04 22:22:47 1.40
  @@ -57,8 +57,8 @@
   is the result of an improperly built gcc.  The gcc for solaris 2.6
   found at a href=http://www.sunfreeware.com/;www.sunfreeware.com/a 
   was built with a beta version of solaris 2.6.  The release version
  -has changed significantly enough that this version will not properly
  -work with it.  There are two workarounds mentioned in
  +of solaris 2.6 changed a few header files enough that the beta-built
  +gcc won't work with it.  There are two workarounds mentioned in
   a href=http://bugs.apache.org/index/full/1336;PR#1336/a.
   bThis is not an Apache bug, and no code will be changed to deal with
   it./b
  
  
  


cvs commit: apachen/htdocs/manual/misc security_tips.html

1997-12-14 Thread dgaudet
dgaudet 97/12/13 16:49:20

  Modified:htdocs/manual install.html
   htdocs/manual/misc security_tips.html
  Removed: htdocs/manual install_1_1.html
  Log:
  We talk about a proper installation occasionally... and assume folks know
  how to set the perms on the serverroot.  But I don't think we document it
  anywhere.  Nowhere that's easily found direct from the how to install
  page.  Document it better, link to it.  Remove the install_1_1 docs.
  Update a 1.2 reference to 1.3.
  
  Revision  ChangesPath
  1.18  +4 -5  apachen/htdocs/manual/install.html
  
  Index: install.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/install.html,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- install.html  1997/11/25 09:47:47 1.17
  +++ install.html  1997/12/14 00:49:18 1.18
  @@ -14,10 +14,7 @@
   
   !--#include virtual=header.html --
   
  -H1 ALIGN=CENTERCompiling and Installing Apache 1.2/H1
  -
  -PIf you wish to download and install an earlier version of Apache please
  -read A HREF=install_1_1.htmlCompiling and Installing Apache 1.1/A./P
  +H1 ALIGN=CENTERCompiling and Installing Apache 1.3/H1
   
   UnixWare users will want to consult A HREF=unixware.htmlbuild notes/A
   for various UnixWare versions before compiling.
  @@ -128,7 +125,9 @@
   designed to be configured and run from the same set of directories
   where it is compiled. If you want to run it from somewhere else, make
   a directory and copy the CODEconf/CODE, CODElogs/CODE and
  -CODEicons/CODE directories into it.  P
  +CODEicons/CODE directories into it.  In either case you should
  +read the a href=misc/security_tips.html#serverrootsecurity tips/a
  +describing how to set the permissions on the server root directory.P
   
   The next step is to edit the configuration files for the server. This
   consists of setting up various Bdirectives/B in up to three
  
  
  
  1.11  +42 -10apachen/htdocs/manual/misc/security_tips.html
  
  Index: security_tips.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/misc/security_tips.html,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- security_tips.html1997/07/06 17:19:07 1.10
  +++ security_tips.html1997/12/14 00:49:19 1.11
  @@ -22,16 +22,48 @@
   
   HR
   
  -H2Permissions on Log File Directories/H2
  -PWhen Apache starts, it opens the log files as the user who started the
  -server before switching to the user defined in the
  -a href=../mod/core.html#userbUser/b/a directive.  Anyone who
  -has write permission for the directory where any log files are
  -being written to can append pseudo-arbitrary data to any file on the
  -system which is writable by the user who starts Apache.  Since the
  -server is normally started by root, you should EMNOT/EM give anyone
  -write permission to the directory where logs are stored unless you
  -want them to have root access.
  +a name=serverroot
  +H2Permissions on ServerRoot Directories/H2/a
  +PIn typical operation, Apache is started by the root
  +user, and it switches to the user defined by the a
  +href=../mod/core.html#userbUser/b/a directive to serve hits.
  +As is the case with any command that root executes, you must take care
  +that it is protected from modification by non-root users.  Not only
  +must the files themselves be writeable only by root, but so must the
  +directories, and parents of all directories.  For example, if you
  +choose to place ServerRoot in code/usr/local/apache/code then it is
  +suggested that you create that directory as root, with commands
  +like these:
  +
  +blockquotepre
  +mkdir /usr/local/apache
  +cd /usr/local/apache
  +mkdir bin conf logs
  +chown 0 . bin conf logs
  +chgrp 0 . bin conf logs
  +chmod 755 . bin conf logs
  +/pre/blockquote
  +
  +It is assumed that /, /usr, and /usr/local are only modifiable by root.
  +When you install the httpd executable, you should ensure that it is
  +similarly protected:
  +
  +blockquotepre
  +cp httpd /usr/local/apache/bin
  +chown 0 /usr/local/apache/bin/httpd
  +chgrp 0 /usr/local/apache/bin/httpd
  +chmod 511 /usr/local/apache/bin/httpd
  +/pre/blockquote
  +
  +pYou can create an htdocs subdirectory which is modifiable by other
  +users -- since root never executes any files out of there, and shouldn't
  +be creating files in there.
  +
  +pIf you allow non-root users to modify any files that root either
  +executes or writes on then you open your system to root compromises.
  +For example, someone could replace the httpd binary so that the next
  +time you start it, it will execute some arbitrary code.  Or someone
  +could overwrite the logs with arbitrary data.
   P
   HR
   H2Server Side Includes/H2
  
  
  


cvs commit: apachen/htdocs/manual/mod core.html mod_log_config.html

1997-12-14 Thread dgaudet
dgaudet 97/12/13 16:57:47

  Modified:htdocs/manual/misc security_tips.html
   htdocs/manual/mod core.html mod_log_config.html
  Log:
  More tweaks related to serverroot/logs/etc.
  
  Revision  ChangesPath
  1.12  +6 -2  apachen/htdocs/manual/misc/security_tips.html
  
  Index: security_tips.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/misc/security_tips.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- security_tips.html1997/12/14 00:49:19 1.11
  +++ security_tips.html1997/12/14 00:57:44 1.12
  @@ -62,8 +62,12 @@
   pIf you allow non-root users to modify any files that root either
   executes or writes on then you open your system to root compromises.
   For example, someone could replace the httpd binary so that the next
  -time you start it, it will execute some arbitrary code.  Or someone
  -could overwrite the logs with arbitrary data.
  +time you start it, it will execute some arbitrary code.  If the logs
  +directory is writeable (by a non-root user), someone
  +could replace a log file with a symlink to some other system file,
  +and then root might overwrite that file with arbitrary data.  If the
  +log files themselves are writeable (by a non-root user), then someone
  +may be able to overwrite the log itself with bogus data.
   P
   HR
   H2Server Side Includes/H2
  
  
  
  1.86  +15 -7 apachen/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/mod/core.html,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- core.html 1997/11/15 00:16:48 1.85
  +++ core.html 1997/12/14 00:57:45 1.86
  @@ -570,7 +570,7 @@
   blockquotecodeErrorLog /dev/null/code/blockquote
   This effectively turns off error logging.p
   
  -SECURITY: See the A HREF=../misc/security_tips.htmlsecurity tips/A
  +SECURITY: See the A HREF=../misc/security_tips.html#serverrootsecurity 
tips/A
   document for details on why your security could be compromised if
   the directory where logfiles are stored is writable by anyone other
   than the user that starts the server.
  @@ -1025,9 +1025,12 @@
   Apache is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
   USE_FLOCK_SERIALIZED_ACCEPT.  This directive should normally be
   left at its default value.  The main reason for changing it is if
  -the codelogs/code directory is NFS mounted, since the lockfile
  -should be stored on a local disk if possible.  The PID of the main
  -server process is automatically appended to the filename.
  +the codelogs/code directory is NFS mounted, since bthe lockfile
  +must be stored on a local disk/b.  The PID of the main
  +server process is automatically appended to the filename. p
  +
  +The LockFile is subject to the same warnings about log file placement and
  +a href=../misc/security_tips.html#serverrootsecurity/a.
   
   PHR
   
  @@ -1245,7 +1248,7 @@
   signal to the process id listed in the PidFile.p
   
   The PidFile is subject to the same warnings about log file placement and
  -a href=../misc/security_tips.htmlsecurity/a.
  +a href=../misc/security_tips.html#serverrootsecurity/a.
   
   phr
   
  @@ -1569,8 +1572,13 @@
   The ServerRoot directive sets the directory in which the server lives.
   Typically it will contain the subdirectories codeconf//code and
   codelogs//code. Relative paths for other configuration files are taken
  -as relative to this directory.br
  -See also a href=../invoking.htmlthe code-d/code option to 
httpd/a.phr
  +as relative to this directory.p
  +
  +See also a href=../invoking.htmlthe code-d/code option to 
httpd/a.p
  +See also a href=../misc/security_tips.html#serverrootthe security 
tips/a
  +for information on how to properly set permissions on the ServerRoot.p
  +
  +hr
   
   h2A name=servertypeServerType directive/A/h2
   !--%plaintext lt;?INDEX {\tt ServerType} directivegt; --
  
  
  
  1.20  +4 -4  apachen/htdocs/manual/mod/mod_log_config.html
  
  Index: mod_log_config.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/mod/mod_log_config.html,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- mod_log_config.html   1997/09/12 14:50:47 1.19
  +++ mod_log_config.html   1997/12/14 00:57:46 1.20
  @@ -173,10 +173,10 @@
   
   h2Security Considerations/h2
   
  -See the A HREF=../misc/security_tips.htmlsecurity tips/A document
  -for details on why your security could be compromised if the directory
  -where logfiles are stored is writable by anyone other than the user
  -that starts the server.
  +See the A HREF=../misc/security_tips.html#securitysecurity tips/A
  +document for details on why your security could

cvs commit: apachen/htdocs/manual/mod core.html

1997-12-14 Thread dgaudet
dgaudet 97/12/13 17:04:57

  Modified:htdocs/manual/mod core.html
  Log:
  The port documentation was a little unclear on its overlap with the Listen
  directive.
  
  PR:   975
  
  Revision  ChangesPath
  1.87  +3 -1  apachen/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/mod/core.html,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- core.html 1997/12/14 00:57:45 1.86
  +++ core.html 1997/12/14 01:04:56 1.87
  @@ -1272,7 +1272,9 @@
   li
   In the absence of any a href=#listenListen/a or
   a href=#bindaddressBindAddress/a directives specifying a port number,
  -the Port directive sets the network port on which the server listens.
  +a Port directive given in the main server
  +(i.e. outside any a href=#virtualhostlt;VirtualHostgt/a section)
  +sets the network port on which the server listens.
   If there are any Listen or BindAddress directives specifying
   code:number/code then Port has no effect on what address the server
   listens at.
  
  
  


cvs commit: apachen/htdocs/manual/mod mod_access.html

1997-12-14 Thread dgaudet
dgaudet 97/12/13 17:07:38

  Modified:htdocs/manual/mod mod_access.html
  Log:
  Note that the CIDR syntaxes are for 1.3 and later.
  
  PR:   1534
  
  Revision  ChangesPath
  1.11  +4 -4  apachen/htdocs/manual/mod/mod_access.html
  
  Index: mod_access.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/mod/mod_access.html,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- mod_access.html   1997/07/30 18:41:47 1.10
  +++ mod_access.html   1997/12/14 01:07:37 1.11
  @@ -53,10 +53,10 @@
   ddAn IP address of a host allowed access
   dtA partial IP address
   ddThe first 1 to 3 bytes of an IP address, for subnet restriction.
  -dtA network/netmask pair
  +dtA network/netmask pair (bApache 1.3 and later/b)
   ddA network a.b.c.d, and a netmask w.x.y.z.  For more fine-grained subnet
   restriction.  (i.e. 10.1.0.0/255.255.0.0)
  -dtA network/nnn CIDR specification
  +dtA network/nnn CIDR specification (bApache 1.3 and later/b)
   ddSimilar to the previous case, except the netmask consists of nnn 
   high-order 1 bits.  (i.e. 10.1.0.0/16 is the same as 
10.1.0.0/255.255.0.0)
   /dl
  @@ -127,10 +127,10 @@
   ddAn IP address of a host denied access
   dtA partial IP address
   ddThe first 1 to 3 bytes of an IP address, for subnet restriction.
  -dtA network/netmask pair
  +dtA network/netmask pair (bApache 1.3 and later/b)
   ddA network a.b.c.d, and a netmask w.x.y.z.  For more fine-grained subnet
   restriction.  (i.e. 10.1.0.0/255.255.0.0)
  -dtA network/nnn CIDR specification
  +dtA network/nnn CIDR specification (bApache 1.3 and later/b)
   ddSimilar to the previous case, except the netmask consists of nnn 
   high-order 1 bits.  (i.e. 10.1.0.0/16 is the same as 
10.1.0.0/255.255.0.0)
   /dl
  
  
  


cvs commit: apachen/src/modules/standard mod_alias.c

1997-12-14 Thread dgaudet
dgaudet 97/12/14 12:48:56

  Modified:src/main alloc.c
   src/modules/standard mod_alias.c
  Log:
  Fix a SIGSEGV for RedirectMatch gone /.  Fix a slight incompatibility
  introduced into pstrcat in rev 1.42.
  
  PR:   1319
  Reviewed by:  Ben Laurie, Martin Kraemer
  
  Revision  ChangesPath
  1.61  +1 -3  apachen/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/alloc.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- alloc.c   1997/12/07 21:33:18 1.60
  +++ alloc.c   1997/12/14 20:48:54 1.61
  @@ -553,11 +553,9 @@
   
   /* Allocate the required string */
   
  -if (len == 0) {
  - return NULL;
  -}
   res = (char *) palloc(a, len + 1);
   cp = res;
  +*cp = '\0';
   
   /* Pass two --- copy the argument strings into the result space */
   
  
  
  
  1.27  +10 -4 apachen/src/modules/standard/mod_alias.c
  
  Index: mod_alias.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_alias.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- mod_alias.c   1997/10/22 20:30:13 1.26
  +++ mod_alias.c   1997/12/14 20:48:55 1.27
  @@ -297,10 +297,16 @@
   
if (p-regexp) {
if (!regexec(p-regexp, r-uri, p-regexp-re_nsub + 1, regm, 0)) {
  - found = pregsub(r-pool, p-real, r-uri,
  - p-regexp-re_nsub + 1, regm);
  - if (found  doesc) {
  - found = escape_uri(r-pool, found);
  + if (p-real) {
  + found = pregsub(r-pool, p-real, r-uri,
  + p-regexp-re_nsub + 1, regm);
  + if (found  doesc) {
  + found = escape_uri(r-pool, found);
  + }
  + }
  + else {
  + /* need something non-null */
  + found = pstrdup(r-pool, );
}
}
}
  
  
  


cvs commit: apachen/src/main http_config.c

1997-12-16 Thread dgaudet
dgaudet 97/12/15 23:36:31

  Modified:src/main http_config.c
  Log:
  Yet another 64-bit tweak like all the others... I'm too lazy to post it and
  wait for votes.
  
  Revision  ChangesPath
  1.89  +1 -1  apachen/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_config.c,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- http_config.c 1997/12/14 14:39:37 1.88
  +++ http_config.c 1997/12/16 07:36:30 1.89
  @@ -876,7 +876,7 @@
  This allows .htaccess to be independent of server_root,
  so the server can be moved or mirrored with less pain.  */
   char *p;
  -int offset = (int) cmd-info;
  +int offset = (int) (long) cmd-info;
   if (os_is_path_absolute(arg))
p = pstrdup(cmd-pool, arg);
   else
  
  
  


cvs commit: apachen/src/modules/standard mod_auth_dbm.c

1997-12-18 Thread dgaudet
dgaudet 97/12/18 11:24:48

  Modified:src/modules/standard mod_auth_dbm.c
  Log:
  fix messed up indentation
  
  Revision  ChangesPath
  1.32  +15 -15apachen/src/modules/standard/mod_auth_dbm.c
  
  Index: mod_auth_dbm.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_auth_dbm.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mod_auth_dbm.c1997/10/22 20:30:16 1.31
  +++ mod_auth_dbm.c1997/12/18 19:24:44 1.32
  @@ -83,21 +83,21 @@
   if ./helpers/TestCompile func dbm_open; then
:
   else
  -case $PLAT in
  - *-linux*)
  - # many systems don't have -ldbm
  - DBM_LIB=
  - if ./helpers/TestCompile lib dbm; then
  - DBM_LIB=-ldbm
  - elif ./helpers/TestCompile lib ndbm; then
  - DBM_LIB=-lndbm
  - fi
  - ;;
  -esac
  -LIBS=$LIBS $DBM_LIB
  -if [ X$DBM_LIB != X ]; then
  - echo  + using $DBM_LIB for mod_auth_dbm
  -fi
  + case $PLAT in
  + *-linux*)
  + # many systems don't have -ldbm
  + DBM_LIB=
  + if ./helpers/TestCompile lib dbm; then
  + DBM_LIB=-ldbm
  + elif ./helpers/TestCompile lib ndbm; then
  + DBM_LIB=-lndbm
  + fi
  + ;;
  + esac
  + LIBS=$LIBS $DBM_LIB
  + if [ X$DBM_LIB != X ]; then
  + echo  + using $DBM_LIB for mod_auth_dbm
  + fi
   fi
* ConfigEnd
* MODULE-DEFINITION-END
  
  
  


cvs commit: apachen/src/modules/standard mod_autoindex.c

1997-12-18 Thread dgaudet
dgaudet 97/12/18 11:53:20

  Modified:src/modules/standard mod_autoindex.c
  Log:
  yet more messed up indentation
  
  Revision  ChangesPath
  1.58  +5 -5  apachen/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- mod_autoindex.c   1997/12/18 19:49:40 1.57
  +++ mod_autoindex.c   1997/12/18 19:53:18 1.58
  @@ -923,20 +923,20 @@
*/
   switch ((*e1)-key) {
   case K_LAST_MOD:
  - s1 = (*e1)-lm_cmp;
  + s1 = (*e1)-lm_cmp;
s2 = (*e2)-lm_cmp;
break;
   case K_SIZE:
  - s1 = (*e1)-size_cmp;
  + s1 = (*e1)-size_cmp;
s2 = (*e2)-size_cmp;
break;
   case K_DESC:
  - s1 = (*e1)-desc;
  + s1 = (*e1)-desc;
s2 = (*e2)-desc;
break;
   case K_NAME:
  - default:
  - s1 = (*e1)-name;
  +default:
  + s1 = (*e1)-name;
s2 = (*e2)-name;
break;
   }
  
  
  


cvs commit: apachen/src/modules/standard mod_digest.c

1997-12-18 Thread dgaudet
dgaudet 97/12/18 12:39:19

  Modified:src/modules/standard mod_digest.c
  Log:
  grrr I dislike gnu indent
  
  Revision  ChangesPath
  1.27  +6 -6  apachen/src/modules/standard/mod_digest.c
  
  Index: mod_digest.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_digest.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- mod_digest.c  1997/10/26 20:20:04 1.26
  +++ mod_digest.c  1997/12/18 20:39:18 1.27
  @@ -173,8 +173,8 @@
   
   while (s != D_EXIT) {
switch (s) {
  - case D_STRING:
  - if (auth_line[0] == '\') {
  + case D_STRING:
  + if (auth_line[0] == '\') {
s = D_VALUE;
}
else {
  @@ -184,8 +184,8 @@
auth_line++;
break;
   
  - case D_VALUE:
  - if (isalnum(auth_line[0])) {
  + case D_VALUE:
  + if (isalnum(auth_line[0])) {
value[vv] = auth_line[0];
vv++;
}
  @@ -212,8 +212,8 @@
auth_line++;
break;
   
  - case D_KEY:
  - if (isalnum(auth_line[0])) {
  + case D_KEY:
  + if (isalnum(auth_line[0])) {
key[vk] = auth_line[0];
vk++;
}
  
  
  


cvs commit: apachen/src/main conf.h

1997-12-19 Thread dgaudet
dgaudet 97/12/18 18:16:02

  Modified:src/main conf.h
  Log:
  Better glibc support for linux.
  
  PR:   1542
  Reviewed by:  Martin Kraemer, Jim Jagielski
  
  Revision  ChangesPath
  1.163 +30 -2 apachen/src/main/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- conf.h1997/12/01 12:10:14 1.162
  +++ conf.h1997/12/19 02:16:01 1.163
  @@ -310,22 +310,50 @@
   #define HAVE_SYSLOG
   
   #elif defined(LINUX)
  +
   #if LINUX  1
   #include features.h
  +
  +/* libc4 systems probably still work, it probably doesn't define
  + *  __GNU_LIBRARY__
  + * libc5 systems define __GNU_LIBRARY__ == 1, but don't define __GLIBC__
  + * glibc 2.x and later systems define __GNU_LIBRARY__ == 6, but list it as
  + * deprecated in favour of __GLIBC__; the value 6 will never be changed.
  + * glibc 1.x systems (i.e. redhat 4.x on sparc/alpha) should have
  + * __GLIBC__  2
  + * all glibc based systems need crypt.h
  + */
   #if defined(__GNU_LIBRARY__)  __GNU_LIBRARY__  1
  -/* it's a glibc host */
   #include crypt.h
  -#define NET_SIZE_T size_t
   #endif
  +
  +/* glibc 2.0.0 through 2.0.4 need size_t * here, where 2.0.5 needs socklen_t 
*
  + * there's no way to discern between these two libraries.  But using int 
should
  + * be portable because otherwise these libs would be hopelessly broken with
  + * reams of existing networking code.  We'll use socklen_t * for 2.1.x and
  + * later.
  + *
  + * int works for all the earlier libs, and is picked up by default later.
  + */
  +#if defined(__GLIBC__)  (__GLIBC__  2 || (__GLIBC__ == 2  
__GLIBC_MINOR__  0))
  +#define NET_SIZE_T socklen_t
  +#endif
  +
   #define HAVE_SHMGET
   #define USE_MMAP_FILES
   #define HAVE_SYS_RESOURCE_H
  +
  +/* glibc 2.1 and later finally define rlim_t */
  +#if !defined(__GLIBC__) || __GLIBC__  2 || (__GLIBC__ == 2  
__GLIBC_MINOR__  1)
   typedef int rlim_t;
  +#endif
   /* flock is faster ... but hasn't been tested on 1.x systems */
   #define USE_FLOCK_SERIALIZED_ACCEPT
  +
   #else
   #define USE_FCNTL_SERIALIZED_ACCEPT
   #endif
  +
   #undef HAVE_GMTOFF
   #undef NO_KILLPG
   #undef NO_SETSID
  
  
  


cvs commit: apachen/src CHANGES

1997-12-19 Thread dgaudet
dgaudet 97/12/18 18:17:17

  Modified:src  CHANGES
  Log:
  pr 1542
  
  Revision  ChangesPath
  1.530 +2 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.529
  retrieving revision 1.530
  diff -u -r1.529 -r1.530
  --- CHANGES   1997/12/14 20:49:48 1.529
  +++ CHANGES   1997/12/19 02:17:15 1.530
  @@ -1,5 +1,7 @@
   Changes with Apache 1.3b4
   
  +  *) Better glibc support under Linux.  [Dean Gaudet] PR#1542
  +
 *) RedirectMatch gone / would cause a SIGSEGV. [Dean Gaudet] PR#1319
   
 *) WIN32: avoid overflows during file canonicalisations.
  
  
  


cvs commit: apachen/src/modules/standard mod_negotiation.c

1997-12-19 Thread dgaudet
dgaudet 97/12/19 10:24:59

  Modified:src  CHANGES
   src/modules/standard mod_negotiation.c
  Log:
  Fix a potential SEGV -- the hdr variable was being incremented twice
  going past the \0 terminator.
  
  Reviewed by:  Jim Jagielski, Martin Kraemer
  
  Revision  ChangesPath
  1.531 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.530
  retrieving revision 1.531
  diff -u -r1.530 -r1.531
  --- CHANGES   1997/12/19 02:17:15 1.530
  +++ CHANGES   1997/12/19 18:24:50 1.531
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b4
   
  +  *) Fix a potential SEGV problem in mod_negotiation when dealing
  + with type-maps.  [Dean Gaudet]
  +
 *) Better glibc support under Linux.  [Dean Gaudet] PR#1542
   
 *) RedirectMatch gone / would cause a SIGSEGV. [Dean Gaudet] PR#1319
  
  
  
  1.62  +5 -4  apachen/src/modules/standard/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_negotiation.c,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- mod_negotiation.c 1997/10/22 20:30:26 1.61
  +++ mod_negotiation.c 1997/12/19 18:24:52 1.62
  @@ -645,10 +645,11 @@
   
   while (*hdr) {
   if (*hdr == '') {
  -while (*++hdr  *hdr != '') {
  -continue;
  -}
  -++hdr;
  + hdr = strchr(hdr, '');
  + if (hdr == NULL) {
  + return;
  + }
  + ++hdr;
   }
   else if (*hdr == '(') {
   while (*hdr  *hdr != ')') {
  
  
  


cvs commit: apachen/src/modules/standard mod_mime_magic.c

1997-12-19 Thread dgaudet
dgaudet 97/12/19 15:53:02

  Modified:src  CHANGES
   src/modules/standard mod_mime_magic.c
  Log:
  - fix an off-by-1 on read() which I think I introduced in an
  earlier cleanup
  
  - fix case where m-desc[] may be left unterminated
  
  - note some code which is not multithread safe
  
  Reviewed by:  Jim Jagielski, Marc Slemko
  
  Revision  ChangesPath
  1.532 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.531
  retrieving revision 1.532
  diff -u -r1.531 -r1.532
  --- CHANGES   1997/12/19 18:24:50 1.531
  +++ CHANGES   1997/12/19 23:52:58 1.532
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b4
   
  +  *) Fix an off-by-1, and an unterminated string error in
  + mod_mime_magic.  [Dean Gaudet]
  +
 *) Fix a potential SEGV problem in mod_negotiation when dealing
with type-maps.  [Dean Gaudet]
   
  
  
  
  1.21  +8 -8  apachen/src/modules/standard/mod_mime_magic.c
  
  Index: mod_mime_magic.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_mime_magic.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_mime_magic.c  1997/11/16 01:52:23 1.20
  +++ mod_mime_magic.c  1997/12/19 23:53:01 1.21
  @@ -881,7 +881,7 @@
   /*
* try looking at the first HOWMANY bytes
*/
  -if ((nbytes = read(fd, (char *) buf, sizeof(buf))) == -1) {
  +if ((nbytes = read(fd, (char *) buf, sizeof(buf) - 1)) == -1) {
aplog_error(APLOG_MARK, APLOG_ERR, r-server,
MODNAME : read failed: %s, r-filename);
return HTTP_INTERNAL_SERVER_ERROR;
  @@ -1086,7 +1086,6 @@
*/
   static int parse(server_rec *serv, pool *p, char *l, int lineno)
   {
  -int i = 0;
   struct magic *m;
   char *t, *s;
   magic_server_config_rec *conf = (magic_server_config_rec *)
  @@ -1297,14 +1296,13 @@
   }
   else
m-nospflag = 0;
  -while ((m-desc[i++] = *l++) != '\0'  i  MAXDESC)
  - /* NULLBODY */ ;
  +strncpy(m-desc, l, sizeof(m-desc) - 1);
  +m-desc[sizeof(m-desc) - 1] = '\0';
   
   #if MIME_MAGIC_DEBUG
   aplog_error(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, serv,
MODNAME : parse line=%d m=%x next=%x cont=%d desc=%s,
  - lineno, m, m-next, m-cont_level,
  - m-desc ? m-desc : NULL);
  + lineno, m, m-next, m-cont_level, m-desc);
   #endif /* MIME_MAGIC_DEBUG */
   
   return 0;
  @@ -1650,7 +1648,7 @@
MODNAME : line=%d mc=%x mc-next=%x cont=%d desc=%s,
m_cont-lineno, m_cont,
m_cont-next, m_cont-cont_level,
  - m_cont-desc ? m_cont-desc : NULL);
  + m_cont-desc);
   #endif
/*
 * this trick allows us to keep *m in sync when the continue
  @@ -1779,6 +1777,7 @@
   case DATE:
   case BEDATE:
   case LEDATE:
  + /* XXX: not multithread safe */
pp = ctime((time_t *)  p-l);
if ((rt = strchr(pp, '\n')) != NULL)
*rt = '\0';
  @@ -1842,10 +1841,10 @@
struct magic *m, int nbytes)
   {
   long offset = m-offset;
  +
   if (offset + sizeof(union VALUETYPE)  nbytes)
  return 0;
   
  -
   memcpy(p, s + offset, sizeof(union VALUETYPE));
   
   if (!mconvert(r, p, m))
  @@ -2066,6 +2065,7 @@
   s = (unsigned char *) memcpy(nbuf, buf, small_nbytes);
   s[small_nbytes] = '\0';
   has_escapes = (memchr(s, '\033', small_nbytes) != NULL);
  +/* XXX: not multithread safe */
   while ((token = strtok((char *) s,  \t\n\r\f)) != NULL) {
s = NULL;   /* make strtok() keep on tokin' */
for (p = names; p  names + NNAMES; p++) {
  
  
  


cvs commit: apache-devsite how-to-release.html

1997-12-20 Thread dgaudet
dgaudet 97/12/20 12:35:10

  Modified:.how-to-release.html
  Log:
  remove STATUS on release
  
  Revision  ChangesPath
  1.20  +2 -2  apache-devsite/how-to-release.html
  
  Index: how-to-release.html
  ===
  RCS file: /export/home/cvs/apache-devsite/how-to-release.html,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- how-to-release.html   1997/10/20 21:09:20 1.19
  +++ how-to-release.html   1997/12/20 20:35:09 1.20
  @@ -118,8 +118,8 @@
   LI Create codesrc/Configuration/code file:br
codeb$ cp src/Configuration.tmpl src/Configuration/b/code
   P
  -LI Remove codeRULES.CVS/code file and various code.cvsignore/code 
files:br
  - codeb$ rm RULES.CVS/b/codebr
  +LI Remove codeSTATUS/code and codeRULES.CVS/code file and various 
code.cvsignore/code files:br
  + codeb$ rm STATUS RULES.CVS/b/codebr
codeb$ find . -name .cvsignore -exec rm {} \;/b/code
UL
LIFONT COLOR=redNote:/FONT If you needed to do a
  
  
  


cvs commit: apachen/htdocs/manual content-negotiation.html

1997-12-20 Thread dgaudet
dgaudet 97/12/20 12:42:29

  Modified:htdocs/manual content-negotiation.html
  Log:
  Lars says:
  
  some people are confused if they see the different naming conventions
  for language negotiated documents (e.g. foo.html.en vs. foo.en.html)
  and how a hyperlink to such a document should look like.
  There's a PR about it (#1559) and I've seen several questions on
  usenet about it.
  
  I tried to clarify this issue in an extra paragraph in the
  content-negotiation.html document (see attachment).
  
  PR:   1559
  Submitted by: Lars Eilebrecht
  Reviewed by:  Dean Gaudet
  
  Revision  ChangesPath
  1.12  +100 -1apachen/htdocs/manual/content-negotiation.html
  
  Index: content-negotiation.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/content-negotiation.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- content-negotiation.html  1997/07/06 17:18:52 1.11
  +++ content-negotiation.html  1997/12/20 20:42:29 1.12
  @@ -15,6 +15,7 @@
   !--#include virtual=header.html --
   h1 ALIGN=CENTERContent Negotiation/h1
   
  +p
   Apache's support for content negotiation has been updated to meet the
   HTTP/1.1 specification. It can choose the best representation of a
   resource based on the browser-supplied preferences for media type,
  @@ -30,6 +31,7 @@
   
   h2About Content Negotiation/h2
   
  +p
   A resource may be available in several different representations. For
   example, it might be available in different languages or different
   media types, or a combination.  One way of selecting the most
  @@ -46,6 +48,7 @@
 Accept-Language: fr
   /pre
   
  +p
   Note that this preference will only be applied when there is a choice
   of representations and they vary by language.
   p
  @@ -76,6 +79,7 @@
   
   h2Negotiation in Apache/h2
   
  +p
   In order to negotiate a resource, the server needs to be given
   information about each of the variants. This is done in one of two
   ways:
  @@ -89,6 +93,7 @@
   
   h3Using a type-map file/h3
   
  +p
   A type map is a document which is associated with the handler
   named codetype-map/code (or, for backwards-compatibility with
   older Apache configurations, the mime type
  @@ -179,6 +184,7 @@
   
   h3Multiviews/h3
   
  +p
   This is a per-directory option, meaning it can be set with an
   codeOptions/code directive within a codelt;Directorygt;/code,
   codelt;Locationgt;/code or codelt;Filesgt;/code
  @@ -261,10 +267,10 @@
   
   h3Apache Negotiation Algorithm/h3
   
  +p
   Apache uses an algorithm to select the 'best' variant (if any) to
   return to the browser. This algorithm is not configurable. It operates
   like this:
  -p
   
   ol
   li
  @@ -323,8 +329,10 @@
 dimensions of variance.
   
   /ol
  +
   h2a name=betterFiddling with Quality Values/a/h2
   
  +p
   Apache sometimes changes the quality values from what would be
   expected by a strict interpretation of the algorithm above. This is to
   get a better result from the algorithm for browsers which do not send
  @@ -337,6 +345,7 @@
   
   h3Media Types and Wildcards/h3
   
  +p
   The Accept: request header indicates preferences for media types. It
   can also include 'wildcard' media types, such as image/* or */*
   where the * matches any string. So a request including:
  @@ -379,6 +388,7 @@
   
   h3Variants with no Language/h3
   
  +p
   If some of the variants for a particular resource have a language
   attribute, and some do not, those variants with no language
   are given a very low language quality factor of 0.001.p
  @@ -396,14 +406,103 @@
   lifoo.html, no language
   /ul
   
  +p
   The meaning of a variant with no language is that it is
   always acceptable to the browser. If the request Accept-Language
   header includes either en or fr (or both) one of foo.en.html
   or foo.fr.html will be returned. If the browser does not list
   either en or fr as acceptable, foo.html will be returned instead.
   
  +h2Note on hyperlinks and naming conventions/h2
  +
  +p
  +If you are using language negotiation you can choose between
  +different naming conventions, because files can have more than one
  +extension, and the order of the extensions is normally irrelevant
  +(see a href=mod/mod_mime.htmlmod_mime/a documentation for details).
  +p
  +A typical file has a mime-type extension (e.g. samphtml/samp),
  +maybe an encoding extension (e.g. sampgz/samp and of course a
  +language extension (e.g. sampen/samp) when we have different
  +language variants of this file.
  +
  +p
  +Examples:
  +ul
  +lifoo.en.html
  +lifoo.html.en
  +lifoo.en.html.gz
  +/ul
  +
  +p
  +Here some more examples of filenames together with valid and invalid 
hyperlinks:
  +/p
  +
  +table border=1 cellpadding=8 cellspacing=0
  +tr
  + thFilename/th
  + thValid hyperlink/th
  + thInvalid hyperlink/th
  +/tr
  +tr
  + tdemfoo.html.en/em/td

cvs commit: apachen/src/main http_protocol.c

1997-12-20 Thread dgaudet
dgaudet 97/12/20 15:44:31

  Modified:src  CHANGES
   src/main http_protocol.c
  Log:
  Fix memory corruption caused by allocating auth usernames in the wrong pool.
  
  PR:   1500
  Reviewed by:  Martin Kraemer, Jim Jagielski
  
  Revision  ChangesPath
  1.533 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.532
  retrieving revision 1.533
  diff -u -r1.532 -r1.533
  --- CHANGES   1997/12/19 23:52:58 1.532
  +++ CHANGES   1997/12/20 23:44:28 1.533
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b4
   
  +  *) Fix memory corruption caused by allocating auth usernames in the
  + wrong pool.  [Dean Gaudet] PR#1500
  +
 *) Fix an off-by-1, and an unterminated string error in
mod_mime_magic.  [Dean Gaudet]
   
  
  
  
  1.170 +5 -1  apachen/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_protocol.c,v
  retrieving revision 1.169
  retrieving revision 1.170
  diff -u -r1.169 -r1.170
  --- http_protocol.c   1997/11/01 22:24:08 1.169
  +++ http_protocol.c   1997/12/20 23:44:30 1.170
  @@ -952,7 +952,11 @@
   }
   
   t = uudecode(r-pool, auth_line);
  -r-connection-user = getword_nulls_nc(r-pool, t, ':');
  +/* Note that this allocation has to be made from r-connection-pool
  + * because it has the lifetime of the connection.  The other allocations
  + * are temporary and can be tossed away any time.
  + */
  +r-connection-user = getword_nulls_nc (r-connection-pool, t, ':');
   r-connection-auth_type = Basic;
   
   *pw = t;
  
  
  


cvs commit: apachen STATUS

1997-12-20 Thread dgaudet
dgaudet 97/12/20 15:45:34

  Modified:.STATUS
  Log:
  updates
  
  Revision  ChangesPath
  1.6   +6 -16 apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- STATUS1997/12/20 23:17:52 1.5
  +++ STATUS1997/12/20 23:45:34 1.6
  @@ -40,9 +40,14 @@
   * Dean's [PATCH] mod_mime_magic small bug fixes
   * Ben Hyde's [PATCH] Let CVS ignore MSDev's ApacheOS[DR] directories
   * Dean's [PATCH] mod_negotiation small bug fix
  +* Ken's stage 2 of moving ap_*() to src/ap (ap_slack() move)
   
   Available:
   
  +* Dean's [PATCH] Re: [BUGFIXES] Wrong GID for PID file and UMASK for logs
  + [EMAIL PROTECTED]
  + Status: Dean +1
  +
   * Dean's [PATCH] two bugs in mod_autoindex
[EMAIL PROTECTED]
Status: Dean +1, Randy +1
  @@ -77,16 +82,12 @@
   
   * Martin's [PATCH] 36kB: Make apache compile  run on an EBCDIC mainframe
[EMAIL PROTECTED]
  - Status: Martin +1
  + Status: Martin +1, Dean +1
   
   * Dean's [PATCH] Re: problem with a .gif and v2.1.4
[EMAIL PROTECTED]
Status: Dean +1, Jim +1
   
  -* Dean's [PATCH] Re: mod_cern_meta/1500: mod_cern_meta corrupts memory 
pool
  - [EMAIL PROTECTED]
  - Status: Dean +1, Jim +1
  -
   * Martin's [PATCH] Gimme a break!
[EMAIL PROTECTED]
Status: Martin +1, Jim +1, Dean +1
  @@ -100,14 +101,6 @@
[EMAIL PROTECTED]
Status: Jim +1, Dean +1
   
  -* Dean's [PATCH] Re: mod_cern_meta/1500: mod_cern_meta corrupts memory 
pool
  - [EMAIL PROTECTED]
  - Status: Dean +1
  -
  -* Ken's stage 2 of moving ap_*() to src/ap (ap_slack() move)
  - [EMAIL PROTECTED]
  - Status: Ken +1, Dean +1, Jim +1
  -
   * Dean's [PATCH] child_timeouts set wrong
[EMAIL PROTECTED]
Status: Jim +1, Dean +1
  @@ -191,9 +184,6 @@
   
   * Release builds: Should we provide Configuration or not?
Should we 'make all suexec' in src/support?
  -
  -* Apache's 'pid' file is created under the UID/GID that Apache
  - switches to. Dean thinks this should be fixed. Ken too.

   * root's environment is inherited by the Apache server. Jim, Ken 
Dean thinks we should recommend using 'env' to build the
  
  
  


cvs commit: apachen STATUS

1997-12-21 Thread dgaudet
dgaudet 97/12/20 16:05:21

  Modified:.STATUS
  Log:
  yadda
  
  Revision  ChangesPath
  1.8   +8 -0  apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- STATUS1997/12/20 23:55:35 1.7
  +++ STATUS1997/12/21 00:05:20 1.8
  @@ -46,6 +46,14 @@
   
   Available:
   
  +* Igor Tatarinov's Re: A tiny correction and a question on writev_it_all
  + [EMAIL PROTECTED]
  + Status: Dean +1
  +
  +* Dean's [PATCH] util_date.c needless reinitialization
  + [EMAIL PROTECTED]
  + Status: Dean +1
  +
   * Dean's [PATCH] Re: [BUGFIXES] Wrong GID for PID file and UMASK for logs
[EMAIL PROTECTED]
Status: Dean +1
  
  
  


cvs commit: apachen/src/test .cvsignore

1997-12-21 Thread dgaudet
dgaudet 97/12/20 16:15:21

  Added:   src/test .cvsignore
  Log:
  be quiet cvs
  
  Revision  ChangesPath
  1.1  apachen/src/test/.cvsignore
  
  Index: .cvsignore
  ===
  a.out
  time-FCNTL
  time-FLOCK
  time-SYSVSEM
  time-SYSVSEM2
  time-PTHREAD
  time-USLOCK
  zb
  test-writev
  test_date
  test_select
  
  
  


cvs commit: apachen/logs .cvsignore

1997-12-21 Thread dgaudet
dgaudet 97/12/20 16:20:21

  Modified:logs .cvsignore
  Log:
  Don't warn about anything here... there shouldn't be anything checked into
  cvs anyway.
  
  Revision  ChangesPath
  1.2   +1 -3  apachen/logs/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /export/home/cvs/apachen/logs/.cvsignore,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- .cvsignore1997/08/25 02:34:59 1.1
  +++ .cvsignore1997/12/21 00:20:20 1.2
  @@ -1,3 +1 @@
  -access_log
  -error_log
  -httpd.pid
  +*
  
  
  


cvs commit: apachen/htdocs .cvsignore

1997-12-21 Thread dgaudet
dgaudet 97/12/20 16:22:00

  Added:   htdocs   .cvsignore
  Log:
  I'm tired of cvs complaining about all my debugging files.  We're not likely
  to be changing this directory much, so ignore any non-cvs files in it.
  
  Revision  ChangesPath
  1.1  apachen/htdocs/.cvsignore
  
  Index: .cvsignore
  ===
  *
  
  
  


cvs commit: apachen/src/main http_protocol.c

1997-12-21 Thread dgaudet
dgaudet 97/12/21 00:18:17

  Modified:.STATUS
   htdocs/manual/misc known_client_problems.html
   src  CHANGES
   src/main http_protocol.c
  Log:
  Tweak the 257th byte bug... happens at the 256th byte as well.
  
  Reviewed by:  Jim Jagielski, Brian Behlendorf
  
  Revision  ChangesPath
  1.13  +1 -4  apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- STATUS1997/12/21 05:31:42 1.12
  +++ STATUS1997/12/21 08:18:12 1.13
  @@ -45,6 +45,7 @@
   * Igor Tatarinov's [PATCH] usage patch (-V)
   * Dean's [PATCH] child_timeout not correctly defined
   * Mark Bixby's [PORT] MPE porting patch
  +* Dean's [PATCH] Re: problem with a .gif and v2.1.4
   
   Available:
   
  @@ -79,10 +80,6 @@
   * Martin's [PATCH] 36kB: Make apache compile  run on an EBCDIC mainframe
[EMAIL PROTECTED]
Status: Martin +1, Dean +1
  -
  -* Dean's [PATCH] Re: problem with a .gif and v2.1.4
  - [EMAIL PROTECTED]
  - Status: Dean +1, Jim +1, Brian +1
   
   * Martin's [PATCH] Gimme a break!
[EMAIL PROTECTED]
  
  
  
  1.4   +2 -2  apachen/htdocs/manual/misc/known_client_problems.html
  
  Index: known_client_problems.html
  ===
  RCS file: 
/export/home/cvs/apachen/htdocs/manual/misc/known_client_problems.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- known_client_problems.html1997/07/22 08:51:02 1.3
  +++ known_client_problems.html1997/12/21 08:18:13 1.4
  @@ -129,11 +129,11 @@
   
   pAll versions of Navigator from 2.0 through 4.0b2 (and possibly later)
   have a problem if the trailing CRLF of the response header starts at
  -the 256th or 257th byte of the response.  A BrowserMatch for this would
  +offset 256, 257 or 258 of the response.  A BrowserMatch for this would
   match on nearly every hit, so the workaround is enabled automatically
   on all responses.  The workaround is to detect when this condition would
   occur in a response and add extra padding to the header to push the
  -trailing CRLF past the 257th byte of the response.
  +trailing CRLF past offset 258 of the response.
   
   a name=boundary-stringh3Multipart responses and Quoted Boundary 
Strings/h3/a
   
  
  
  
  1.535 +5 -1  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.534
  retrieving revision 1.535
  diff -u -r1.534 -r1.535
  --- CHANGES   1997/12/20 23:51:03 1.534
  +++ CHANGES   1997/12/21 08:18:14 1.535
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b4
  -  
  +
  +  *) It appears the 257th byte bug (see
  + htdocs/manual/misc/known_client_problems.html#257th-byte) can happen
  + at the 256th byte as well.  Fixed.  [Dean Gaudet]
  +
 *) Fix mod_mime_magic under OS/2, no support for block devices.
[Brian Havard]
   
  
  
  
  1.171 +2 -2  apachen/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_protocol.c,v
  retrieving revision 1.170
  retrieving revision 1.171
  diff -u -r1.170 -r1.171
  --- http_protocol.c   1997/12/20 23:44:30 1.170
  +++ http_protocol.c   1997/12/21 08:18:16 1.171
  @@ -1092,7 +1092,7 @@
   
   /* Navigator versions 2.x, 3.x and 4.0 betas up to and including 4.0b2
* have a header parsing bug.  If the terminating \r\n occur starting
  - * at the 256th or 257th byte of output then it will not properly parse
  + * at offset 256, 257 or 258 of output then it will not properly parse
* the headers.  Curiously it doesn't exhibit this problem at 512, 513.
* We are guessing that this is because their initial read of a new request
* uses a 256 byte buffer, and subsequent reads use a larger buffer.
  @@ -1112,7 +1112,7 @@
   long int bs;
   
   bgetopt(client, BO_BYTECT, bs);
  -if (bs == 256 || bs == 257)
  +if (bs = 255  bs = 257)
   bputs(X-Pad: avoid browser bug\015\012, client);
   
   bputs(\015\012, client);  /* Send the terminating empty line */
  
  
  


cvs commit: apachen/src/modules/standard mod_autoindex.c

1997-12-23 Thread dgaudet
dgaudet 97/12/22 17:50:03

  Modified:.STATUS
   src  CHANGES
   src/modules/standard mod_autoindex.c
  Log:
  AddIconByType (TXT,/icons/text.gif text/*, note the missing closing
  paren, does the wrong thing, and doesn't report an error.
  
  Don't fread() without testing for errors.
  
  Reviewed by:  Jim Jagielski, Martin Kraemer
  
  Revision  ChangesPath
  1.16  +1 -4  apachen/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- STATUS1997/12/22 21:52:59 1.15
  +++ STATUS1997/12/23 01:49:58 1.16
  @@ -48,6 +48,7 @@
   * Dean's [PATCH] Re: problem with a .gif and v2.1.4
   * Dean's [PATCH] util_date.c needless reinitialization
   * Martin's [PATCH] Gimme a break! (missing break;s in mod_include)
  +* Dean's [PATCH] two bugs in mod_autoindex
   
   Available:
   
  @@ -58,10 +59,6 @@
   * Dean's [PATCH] Re: [BUGFIXES] Wrong GID for PID file and UMASK for logs
[EMAIL PROTECTED]
Status: Dean +1, Martin +1
  -
  -* Dean's [PATCH] two bugs in mod_autoindex
  - [EMAIL PROTECTED]
  - Status: Dean +1, Randy +1, Martin +1
   
   * Dean's [PATCH] fix Rasmus' chunking error
[EMAIL PROTECTED]
  
  
  
  1.536 +4 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.535
  retrieving revision 1.536
  diff -u -r1.535 -r1.536
  --- CHANGES   1997/12/21 08:18:14 1.535
  +++ CHANGES   1997/12/23 01:50:00 1.536
  @@ -1,4 +1,8 @@
   Changes with Apache 1.3b4
  +  
  +  *) mod_autoindex had an fread() without checking the result code.
  + It also wouldn't handle AddIconByType (TXT,/icons/text.gif text/*
  + (note the missing closing paren) properly.  [Dean Gaudet]
   
 *) It appears the 257th byte bug (see
htdocs/manual/misc/known_client_problems.html#257th-byte) can happen
  
  
  
  1.60  +12 -2 apachen/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- mod_autoindex.c   1997/12/18 19:55:17 1.59
  +++ mod_autoindex.c   1997/12/23 01:50:02 1.60
  @@ -186,8 +186,14 @@
   char *iconbak = pstrdup(cmd-pool, icon);
   
   if (icon[0] == '(') {
  - char *alt = getword_nc(cmd-pool, iconbak, ',');
  - iconbak[strlen(iconbak) - 1] = '\0';/* Lose closing paren */
  + char *alt;
  + char *cl = strchr(iconbak, ')');
  +
  + if (cl == NULL) {
  + return missing closing paren;
  + }
  + alt = getword_nc(cmd-pool, iconbak, ',');
  + *cl = '\0'; /* Lose closing paren */
add_alt(cmd, d, alt[1], to);
   }
   if (cmd-info == BY_PATH)
  @@ -612,6 +618,10 @@
if (!(thefile = pfopen(r-pool, r-filename, r)))
 return NULL;
n = fread(titlebuf, sizeof(char), MAX_STRING_LEN - 1, thefile);
  + if (n = 0) {
  + pfclose(r-pool, thefile);
  + return NULL;
  + }
titlebuf[n] = '\0';
for (x = 0, p = 0; titlebuf[x]; x++) {
if (toupper(titlebuf[x]) == find[p]) {
  
  
  


  1   2   3   4   5   6   7   >