cvs commit: apache-1.3/src/main http_request.c

1999-04-20 Thread dgaudet
dgaudet 99/04/20 16:38:45

  Modified:src  CHANGES
   src/main http_request.c
  Log:
  copy expecting_100 when doing an internal redirect
  
  PR:   3910
  Submitted by: Jose KAHAN <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.1316+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1315
  retrieving revision 1.1316
  diff -u -r1.1315 -r1.1316
  --- CHANGES   1999/04/20 21:53:22 1.1315
  +++ CHANGES   1999/04/20 23:38:41 1.1316
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.7
   
  +  *) The "100 Continue" response wasn't being sent after internal
  + redirects. [Jose KAHAN <[EMAIL PROTECTED]>] PR#3910
  +
 *) When padding the name with spaces for display, mod_autoindex would
count &, <, and > in their escaped width, messing up the display.
[Dean Gaudet] PR#4075
  
  
  
  1.147 +1 -0  apache-1.3/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_request.c,v
  retrieving revision 1.146
  retrieving revision 1.147
  diff -u -r1.146 -r1.147
  --- http_request.c1999/03/07 15:05:36 1.146
  +++ http_request.c1999/04/20 23:38:44 1.147
  @@ -1309,6 +1309,7 @@
   
   new->htaccess= r->htaccess;
   new->no_cache= r->no_cache;
  +new->expecting_100= r->expecting_100;
   new->no_local_copy   = r->no_local_copy;
   new->read_length = r->read_length; /* We can only read it once */
   new->vlist_validator = r->vlist_validator;
  
  
  


cvs commit: apache-1.3/conf mime.types

1999-04-20 Thread dgaudet
dgaudet 99/04/20 16:19:36

  Modified:conf mime.types
  Log:
  add .xls (flame away)
  
  PR:   3935
  
  Revision  ChangesPath
  1.24  +1 -1  apache-1.3/conf/mime.types
  
  Index: mime.types
  ===
  RCS file: /home/cvs/apache-1.3/conf/mime.types,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- mime.types1999/03/14 23:58:59 1.23
  +++ mime.types1999/04/20 23:19:33 1.24
  @@ -117,7 +117,7 @@
   application/vnd.mitsubishi.misty-guard.trustweb
   application/vnd.ms-artgalry
   application/vnd.ms-asf
  -application/vnd.ms-excel
  +application/vnd.ms-excel xls
   application/vnd.ms-powerpointppt
   application/vnd.ms-project
   application/vnd.ms-tnef
  
  
  


cvs commit: apache-1.3/htdocs/manual/mod core.html

1999-04-20 Thread jim
jim 99/04/20 15:19:17

  Modified:htdocs/manual/misc perf-tuning.html
   htdocs/manual/mod core.html
  Log:
  Document the MaxRequestsPerChild values wrt
  KeepAlives and how to tune it
  
  Revision  ChangesPath
  1.17  +6 -6  apache-1.3/htdocs/manual/misc/perf-tuning.html
  
  Index: perf-tuning.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/misc/perf-tuning.html,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- perf-tuning.html  1998/12/18 22:29:56 1.16
  +++ perf-tuning.html  1999/04/20 22:19:13 1.17
  @@ -209,12 +209,12 @@
   as a guide.
   
   Related to process creation is process death induced by the
  -MaxRequestsPerChild setting.  By default this is 30, which
  -is probably far too low unless your server is using a module such as
  -mod_perl which causes children to have bloated memory
  -images.  If your server is serving mostly static pages then consider
  -raising this value to something like 1.  The code is robust enough
  -that this shouldn't be a problem.
  +MaxRequestsPerChild setting.  By default this is 0, which
  +means that there is no limit to the number of requests handled
  +per child. If your configuration currently has this set to some
  +very low number, such as 30, you may want to bump this up significantly.
  +If you are running SunOS or an old version of Solaris, limit this
  +to 1 or so because of memory leaks.
   
   When keep-alives are in use, children will be kept busy
   doing nothing waiting for more requests on the already open
  
  
  
  1.146 +4 -0  apache-1.3/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/core.html,v
  retrieving revision 1.145
  retrieving revision 1.146
  diff -u -r1.145 -r1.146
  --- core.html 1999/02/09 20:20:23 1.145
  +++ core.html 1999/04/20 22:19:15 1.146
  @@ -1998,6 +1998,10 @@
   
   This directive has no effect on Win32.
   
  +NOTE: For KeepAlive requests, only the first
  +request is counted towards this limit. In effect, it changes the
  +behavior to limit the number of connections per child.
  +
   
   
   MaxSpareServers directive
  
  
  


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

1999-04-20 Thread dgaudet
dgaudet 99/04/20 14:53:27

  Modified:src  CHANGES
   src/modules/standard mod_autoindex.c
  Log:
  the width stuff wasn't taking into account &escapes;
  
  PR:   4075
  
  Revision  ChangesPath
  1.1315+4 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1314
  retrieving revision 1.1315
  diff -u -r1.1314 -r1.1315
  --- CHANGES   1999/04/20 19:42:54 1.1314
  +++ CHANGES   1999/04/20 21:53:22 1.1315
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.7
   
  +  *) When padding the name with spaces for display, mod_autoindex would
  + count &, <, and > in their escaped width, messing up the display.
  + [Dean Gaudet] PR#4075
  +
 *) PORT: fixed a compilation problem on NEXT.
[Jacques Distler <[EMAIL PROTECTED]>] PR#4130
   
  
  
  
  1.102 +21 -64apache-1.3/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- mod_autoindex.c   1999/01/04 19:49:41 1.101
  +++ mod_autoindex.c   1999/04/20 21:53:25 1.102
  @@ -410,8 +410,8 @@
else {
int width = atoi(&w[10]);
   
  - if (width < 1) {
  - return "NameWidth value must be greater than 1";
  + if (width < 5) {
  + return "NameWidth value must be greater than 5";
}
d_cfg->name_width = width;
d_cfg->name_adjust = K_NOADJUST;
  @@ -1042,41 +1042,6 @@
   }
   }
   
  -/*
  - * Fit a string into a specified buffer width, marking any
  - * truncation.  The size argument is the actual buffer size, including
  - * the \0 termination byte.  The buffer will be prefilled with blanks.
  - * If the pad argument is false, any extra spaces at the end of the
  - * buffer are omitted.  (Used when constructing anchors.)
  - */
  -static ap_inline char *widthify(const char *s, char *buff, int size, int pad)
  -{
  -int s_len;
  -
  -memset(buff, ' ', size);
  -buff[size - 1] = '\0';
  -s_len = strlen(s);
  -if (s_len > (size - 1)) {
  - ap_cpystrn(buff, s, size);
  - if (size > 1) {
  - buff[size - 2] = '>';
  - }
  - if (size > 2) {
  - buff[size - 3] = '.';
  - }
  - if (size > 3) {
  - buff[size - 4] = '.';
  - }
  -}
  -else {
  - ap_cpystrn(buff, s, s_len + 1);
  - if (pad) {
  - buff[s_len] = ' ';
  - }
  -}
  -return buff;
  -}
  -
   static void output_directories(struct ent **ar, int n,
   autoindex_config_rec *d, request_rec *r,
   int autoindex_opts, char keyid, char direction)
  @@ -1088,6 +1053,7 @@
   pool *scratch = ap_make_sub_pool(r->pool);
   int name_width;
   char *name_scratch;
  +char *pad_scratch;
   
   if (name[0] == '\0') {
name = "/";
  @@ -1102,10 +1068,10 @@
}
}
   }
  -++name_width;
   name_scratch = ap_palloc(r->pool, name_width + 1);
  -memset(name_scratch, ' ', name_width);
  -name_scratch[name_width] = '\0';
  +pad_scratch = ap_palloc(r->pool, name_width + 1);
  +memset(pad_scratch, ' ', name_width);
  +pad_scratch[name_width] = '\0';
   
   if (autoindex_opts & FANCY_INDEXING) {
ap_rputs("", r);
  @@ -1122,15 +1088,9 @@
);
}
ap_rputs("> ", r);
  - }
  -emit_link(r, widthify("Name", name_scratch,
  -   (name_width > 5) ? 5 : name_width, K_NOPAD),
  -   K_NAME, keyid, direction, static_columns);
  - if (name_width > 5) {
  - memset(name_scratch, ' ', name_width);
  - name_scratch[name_width] = '\0';
  - ap_rputs(&name_scratch[5], r);
}
  +emit_link(r, "Name", K_NAME, keyid, direction, static_columns);
  + ap_rputs(pad_scratch + 4, r);
/*
 * Emit the guaranteed-at-least-one-space-between-columns byte.
 */
  @@ -1156,7 +1116,6 @@
   
   for (x = 0; x < n; x++) {
char *anchor, *t, *t2;
  - char *pad;
int nwidth;
   
ap_clear_pool(scratch);
  @@ -1167,15 +1126,12 @@
if (t[0] == '\0') {
t = "/";
}
  -/* 1234567890123456 */
t2 = "Parent Directory";
  - pad = name_scratch + 16;
anchor = ap_escape_html(scratch, ap_os_escape_path(scratch, t, 0));
}
else {
t = ar[x]->name;
  - pad = name_scratch + strlen(t);
  - t2 = ap_escape_html(scratch, t);
  + t2 = t;
anchor = ap_escape_html(scra

cvs commit: apache-1.3/conf highperformance.conf-dist httpd.conf-dist

1999-04-20 Thread jim
jim 99/04/20 14:40:59

  Modified:conf highperformance.conf-dist httpd.conf-dist
  Log:
  Change of the conf-dist default setting for
  MaxRequestsPerChild, as well as some notes about it
  
  Revision  ChangesPath
  1.3   +2 -1  apache-1.3/conf/highperformance.conf-dist
  
  Index: highperformance.conf-dist
  ===
  RCS file: /export/home/cvs/apache-1.3/conf/highperformance.conf-dist,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- highperformance.conf-dist 1998/10/03 11:05:05 1.2
  +++ highperformance.conf-dist 1999/04/20 21:40:58 1.3
  @@ -18,7 +18,8 @@
   StartServers 5
   MinSpareServers 5
   MaxSpareServers 10
  -MaxRequestsPerChild 1000
  +# Assume no memory leaks at all
  +MaxRequestsPerChild 0
   
   # this is a True Config File
   # see http://www.apache.org/info/three-config-files.html
  
  
  
  1.41  +8 -2  apache-1.3/conf/httpd.conf-dist
  
  Index: httpd.conf-dist
  ===
  RCS file: /export/home/cvs/apache-1.3/conf/httpd.conf-dist,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- httpd.conf-dist   1999/04/20 18:03:09 1.40
  +++ httpd.conf-dist   1999/04/20 21:40:59 1.41
  @@ -158,9 +158,15 @@
   # as to avoid problems after prolonged use when Apache (and maybe the
   # libraries it uses) leak memory or other resources.  On most systems, this
   # isn't really needed, but a few (such as Solaris) do have notable leaks
  -# in the libraries.
  +# in the libraries. For these platforms, set to something like 1
  +# or so; a setting of 0 means unlimited.
   #
  -MaxRequestsPerChild 30
  +# NOTE: This value does not include keepalive requests after the initial
  +#   request per connection. For example, if a child process handles
  +#   an initial request and 10 subsequent "keptalive" requests, it
  +#   would only count as 1 request towards this limit.
  +#
  +MaxRequestsPerChild 0
   
   #
   # Listen: Allows you to bind Apache to specific IP addresses and/or
  
  
  


cvs commit: apache-apr/docs fileio.txt

1999-04-20 Thread rbb
rbb 99/04/20 13:52:54

  Modified:docs fileio.txt
  Log:
  Forgot one return code in the docs, so here it is
  
  Revision  ChangesPath
  1.15  +2 -1  apache-apr/docs/fileio.txt
  
  Index: fileio.txt
  ===
  RCS file: /home/cvs/apache-apr/docs/fileio.txt,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- fileio.txt1999/04/20 20:46:43 1.14
  +++ fileio.txt1999/04/20 20:52:53 1.15
  @@ -184,7 +184,8 @@
Arguments:
  arg 1)  The directory to create the named pipe in.  Can BE NULL! 
  arg 2)  The permissions for the named pipe.
  -   return) The name of the newly created pipe. (fully defined path)
  +   return) The name of the newly created pipe. (fully defined path) NULL
  +   on failure.
   NOTE:  If directory name is NULL, the platform decides where it is best to 
put
  the pipe.  To get it in the current dir, use "." here :) 
   
  
  
  


cvs commit: apache-apr/docs fileio.txt threadproc.txt

1999-04-20 Thread rbb
rbb 99/04/20 13:46:43

  Modified:apr/file_io/unix Makefile
   include  apr_file_io.h
   docs fileio.txt threadproc.txt
  Added:   apr/file_io/unix pipe.c
  Log:
  added create_pipe and create_namedpipe calls to apr.  These are untested,
  because I will be using the createprocess stuff to test them as soon as I 
write
  it.  They do compile though.
  
  Revision  ChangesPath
  1.7   +2 -1  apache-apr/apr/file_io/unix/Makefile
  
  Index: Makefile
  ===
  RCS file: /home/cvs/apache-apr/apr/file_io/unix/Makefile,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile  1999/04/12 17:48:19 1.6
  +++ Makefile  1999/04/20 20:46:40 1.7
  @@ -48,7 +48,7 @@
   LIB=  libfile.a
   
   OBJS= open.o readwrite.o filedup.o filestat.o seek.o dir.o\
  -  fileacc.o
  +  fileacc.o pipe.o
   .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $<
   
  @@ -89,3 +89,4 @@
   seek.o: seek.c
   dir.o: dir.c
   fileacc.o: fileacc.c
  +pipe.o: pipe.c
  
  
  
  1.1  apache-apr/apr/file_io/unix/pipe.c
  
  Index: pipe.c
  ===
  /* 
   * Copyright (c) 1999 The Apache Group.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. All advertising materials mentioning features or use of this
   *software must display the following acknowledgment:
   *"This product includes software developed by the Apache Group
   *for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 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]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *acknowledgment:
   *"This product includes software developed by the Apache Group
   *for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY 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.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see .
   *
   */
  
  #include "apr_file_io.h"
  #include "apr_general.h"
  #include 
  #include 
  #include 
  #include 
  #include 
  
  apr_status_t apr_create_pipe(apr_file_t *in, apr_file_t *out)
  {
  int filedes[2];
  
  if (pipe(filedes) == -1) {
  return APR_FAILURE;
  }
  
  in->filedes = filedes[0];
  in->fname = strdup("PIPE");
  
  out->filedes = filedes[1];
  out->fname = strdup("PIPE");
  
  return APR_SUCCESS;
  }
  
  char *apr_create_namedpipe(char *dirpath, apr_fileperms_t mode)
  {
  char *tmp;
  
  tmp = tempnam(dirpath, NULL);
  if (mkfifo(tmp, mode) == -1) {
  free(tmp);
  return NULL;
  }
  return tmp;
  } 
  
   
  
  
  
  1.16  +3 -0  apache-apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===
  RCS file: /home/cvs/apache-apr/include/apr_file_io.h,v
  retrieving revisio

cvs commit: apache-1.3/htdocs/manual/misc known_client_problems.html

1999-04-20 Thread dgaudet
dgaudet 99/04/20 13:00:40

  Modified:htdocs/manual/misc known_client_problems.html
  Log:
  ie40 screws up vary
  
  PR:   4118
  
  Revision  ChangesPath
  1.16  +7 -0  apache-1.3/htdocs/manual/misc/known_client_problems.html
  
  Index: known_client_problems.html
  ===
  RCS file: /home/cvs/apache-1.3/htdocs/manual/misc/known_client_problems.html,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- known_client_problems.html1999/01/22 18:04:11 1.15
  +++ known_client_problems.html1999/04/20 20:00:39 1.16
  @@ -279,6 +279,13 @@
   these versions of Lynx.  As a workaround future versions of Apache will
   ignore this header when sent by the Lynx client.
   
  +MSIE 4.0 mishandles Vary response header
  +
  +MSIE 4.0 does not handle a Vary header properly.  The Vary header is
  +generated by mod_rewrite in apache 1.3.  The result is an error from MSIE
  +saying it cannot download the requested file.  There are more details
  +in http://bugs.apache.org/index/full/4118";>PR#4118.
  +
   
   
   
  
  
  


cvs commit: apache-1.3/src/include ap_config.h

1999-04-20 Thread dgaudet
dgaudet 99/04/20 12:43:00

  Modified:src  CHANGES
   src/include ap_config.h
  Log:
  what the heck?  We don't use n_long anywhere, why define it?
  And even more perplexing -- why were the rlim_t and n_long conditionalized
  on S_IWOTH ??
  
  PR:   4130
  
  Revision  ChangesPath
  1.1314+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1313
  retrieving revision 1.1314
  diff -u -r1.1313 -r1.1314
  --- CHANGES   1999/04/20 19:15:34 1.1313
  +++ CHANGES   1999/04/20 19:42:54 1.1314
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.7
   
  +  *) PORT: fixed a compilation problem on NEXT.
  + [Jacques Distler <[EMAIL PROTECTED]>] PR#4130
  +
 *) r->request_time wasn't being set properly in certain error conditions.
[Dean Gaudet] PR#4156
   
  
  
  
  1.254 +0 -4  apache-1.3/src/include/ap_config.h
  
  Index: ap_config.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/ap_config.h,v
  retrieving revision 1.253
  retrieving revision 1.254
  diff -u -r1.253 -r1.254
  --- ap_config.h   1999/04/08 11:36:32 1.253
  +++ ap_config.h   1999/04/20 19:42:59 1.254
  @@ -367,10 +367,6 @@
   #endif
   #ifndef S_IWOTH
   #define S_IWOTH 02
  -#ifndef rlim_t
  -typedef int rlim_t;
  -#endif
  -typedef u_long n_long;
   #endif
   
   #define STDIN_FILENO  0
  
  
  


cvs commit: apache-1.3/htdocs/manual windows.html

1999-04-20 Thread dgaudet
dgaudet 99/04/20 12:18:42

  Modified:htdocs/manual windows.html
  Log:
  note about 127.0.0.1
  
  PR:   4155
  
  Revision  ChangesPath
  1.29  +6 -0  apache-1.3/htdocs/manual/windows.html
  
  Index: windows.html
  ===
  RCS file: /home/cvs/apache-1.3/htdocs/manual/windows.html,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- windows.html  1999/04/08 21:56:40 1.28
  +++ windows.html  1999/04/20 19:18:41 1.29
  @@ -202,6 +202,12 @@
   This should respond with a welcome page, and a link to the Apache
   manual. If nothing happens or you get an error, look in the
   error_log file in the logs directory.
  +If your host isn't connected to the net, you may have to use
  +this URL:
  +
  +
  +  http://127.0.0.1/
  +
   
   
   
  
  
  


cvs commit: apache-1.3/src/main http_main.c http_protocol.c

1999-04-20 Thread dgaudet
dgaudet 99/04/20 12:15:46

  Modified:src  CHANGES
   src/main http_main.c http_protocol.c
  Log:
  r->request_time wasn't being set in certain error cases
  
  PR:   4156
  
  Revision  ChangesPath
  1.1313+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1312
  retrieving revision 1.1313
  diff -u -r1.1312 -r1.1313
  --- CHANGES   1999/04/20 18:36:01 1.1312
  +++ CHANGES   1999/04/20 19:15:34 1.1313
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.7
   
  +  *) r->request_time wasn't being set properly in certain error conditions.
  + [Dean Gaudet] PR#4156
  +
 *) PORT: deal with UTS compiler error in http_protocol.c
[Dave Dykstra <[EMAIL PROTECTED]>] PR#4189
   
  
  
  
  1.430 +6 -1  apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.429
  retrieving revision 1.430
  diff -u -r1.429 -r1.430
  --- http_main.c   1999/04/08 21:04:43 1.429
  +++ http_main.c   1999/04/20 19:15:39 1.430
  @@ -1079,8 +1079,13 @@
log_req = log_req->prev;
}
   
  - if (!current_conn->keptalive)
  + if (!current_conn->keptalive) {
  + /* in some cases we come here before setting the time */
  + if (log_req->request_time == 0) {
  +   log_req->request_time = time(0);
  + }
ap_log_transaction(log_req);
  + }
   
ap_bsetflag(save_req->connection->client, B_EOUT, 1);
ap_bclose(save_req->connection->client);
  
  
  
  1.264 +4 -0  apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.263
  retrieving revision 1.264
  diff -u -r1.263 -r1.264
  --- http_protocol.c   1999/04/20 18:36:07 1.263
  +++ http_protocol.c   1999/04/20 19:15:41 1.264
  @@ -791,6 +791,10 @@
   while ((len = getline(l, sizeof(l), conn->client, 0)) <= 0) {
   if ((len < 0) || ap_bgetflag(conn->client, B_EOF)) {
   ap_bsetflag(conn->client, B_SAFEREAD, 0);
  + /* this is a hack to make sure that request time is set,
  +  * it's not perfect, but it's better than nothing 
  +  */
  + r->request_time = time(0);
   return 0;
   }
   }
  
  
  


cvs commit: apache-1.3/src/main http_protocol.c

1999-04-20 Thread dgaudet
dgaudet 99/04/20 11:36:10

  Modified:src  CHANGES
   src/main http_protocol.c
  Log:
  deal with UTS compiler error
  
  PR:   4189
  Submitted by: Dave Dykstra <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.1312+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1311
  retrieving revision 1.1312
  diff -u -r1.1311 -r1.1312
  --- CHANGES   1999/04/20 17:51:35 1.1311
  +++ CHANGES   1999/04/20 18:36:01 1.1312
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.7
   
  +  *) PORT: deal with UTS compiler error in http_protocol.c
  + [Dave Dykstra <[EMAIL PROTECTED]>] PR#4189
  +
 *) Add ap_vrprintf() function.  [John Tobey <[EMAIL PROTECTED]>] PR#4246
   
 *) Fix the mod_mime hash table to work properly with locales other
  
  
  
  1.263 +10 -1 apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.262
  retrieving revision 1.263
  diff -u -r1.262 -r1.263
  --- http_protocol.c   1999/04/20 17:51:38 1.262
  +++ http_protocol.c   1999/04/20 18:36:07 1.263
  @@ -1170,7 +1170,16 @@
* and must be listed in order.
*/
   
  -static const char * const status_lines[RESPONSE_CODES] = {
  +#ifdef UTS21
  +/* The second const triggers an assembler bug on UTS 2.1.
  + * Another workaround is to move some code out of this file into another,
  + *   but this is easier.  Dave Dykstra, 3/31/99 
  + */
  +static const char * status_lines[RESPONSE_CODES] =
  +#else
  +static const char * const status_lines[RESPONSE_CODES] =
  +#endif
  +{
   "100 Continue",
   "101 Switching Protocols",
   "102 Processing",
  
  
  


cvs commit: apache-1.3 configure

1999-04-20 Thread dgaudet
dgaudet 99/04/20 11:19:16

  Modified:.configure
  Log:
  since the help is automatically generated, and it takes quite some time
  to generate it, warn folks.  It confused me at first too.
  
  PR: 4200
  
  Revision  ChangesPath
  1.82  +3 -1  apache-1.3/configure
  
  Index: configure
  ===
  RCS file: /home/cvs/apache-1.3/configure,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- configure 1999/04/20 15:44:07 1.81
  +++ configure 1999/04/20 18:19:14 1.82
  @@ -87,7 +87,9 @@
   quiet=no
   verbose=no
   case "$*" in
  ---help|*--help|*--help* ) help=yes; quiet=yes ;;
  +--help|*--help|*--help* ) help=yes; quiet=yes
  +  echo "hang on a moment, generating help"
  + ;;
   --quiet|*--quiet|*--quiet* ) quiet=yes ;;
   --verbose|*--verbose|*--verbose*|-v|*-v|*-v* ) verbose=yes ;;
   * ) ;;
  
  
  


cvs commit: apache-1.3/conf httpd.conf-dist

1999-04-20 Thread dgaudet
dgaudet 99/04/20 11:03:12

  Modified:conf httpd.conf-dist
  Log:
  protect .ht* files ... rather than just .htaccess (it costs pretty
  much the same)
  
  PR:   4215
  
  Revision  ChangesPath
  1.40  +4 -1  apache-1.3/conf/httpd.conf-dist
  
  Index: httpd.conf-dist
  ===
  RCS file: /home/cvs/apache-1.3/conf/httpd.conf-dist,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- httpd.conf-dist   1999/04/20 17:59:35 1.39
  +++ httpd.conf-dist   1999/04/20 18:03:09 1.40
  @@ -361,7 +361,10 @@
   # .htaccess files.  If you change the AccessFileName directive above,
   # be sure to make the corresponding changes here.
   #
  -
  +# Also, folks tend to use names such as .htpasswd for password
  +# files, so this will protect those as well.
  +#
  +
   Order allow,deny
   Deny from all
   
  
  
  


cvs commit: apache-1.3/conf httpd.conf-dist

1999-04-20 Thread dgaudet
dgaudet 99/04/20 10:59:38

  Modified:conf httpd.conf-dist
  Log:
  * matches a single component, this example makes more sense
  
  PR:   4221
  
  Revision  ChangesPath
  1.39  +1 -1  apache-1.3/conf/httpd.conf-dist
  
  Index: httpd.conf-dist
  ===
  RCS file: /home/cvs/apache-1.3/conf/httpd.conf-dist,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- httpd.conf-dist   1999/03/10 09:14:27 1.38
  +++ httpd.conf-dist   1999/04/20 17:59:35 1.39
  @@ -328,7 +328,7 @@
   # Control access to UserDir directories.  The following is an example
   # for a site where these directories are restricted to read-only.
   #
  -#
  +#
   #AllowOverride FileInfo AuthConfig Limit
   #Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
   #
  
  
  


cvs commit: apache-1.3/src/main http_protocol.c

1999-04-20 Thread dgaudet
dgaudet 99/04/20 10:51:40

  Modified:src  CHANGES
   src/include ap_mmn.h http_protocol.h
   src/main http_protocol.c
  Log:
  Add ap_vrprintf() function
  
  PR:   4246
  Submitted by: John Tobey <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.1311+2 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1310
  retrieving revision 1.1311
  diff -u -r1.1310 -r1.1311
  --- CHANGES   1999/04/20 17:27:47 1.1310
  +++ CHANGES   1999/04/20 17:51:35 1.1311
  @@ -1,5 +1,7 @@
   Changes with Apache 1.3.7
   
  +  *) Add ap_vrprintf() function.  [John Tobey <[EMAIL PROTECTED]>] PR#4246
  +
 *) Fix the mod_mime hash table to work properly with locales other
than C.  [Dean Gaudet] PR#3427
   
  
  
  
  1.33  +2 -1  apache-1.3/src/include/ap_mmn.h
  
  Index: ap_mmn.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/ap_mmn.h,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- ap_mmn.h  1999/03/20 23:43:23 1.32
  +++ ap_mmn.h  1999/04/20 17:51:37 1.33
  @@ -214,6 +214,7 @@
* 19990108.6   - SIGPIPE is now ignored by the core server.
* 19990108.7   - ap_isxdigit added
* 19990320 - METHODS and M_INVALID symbol values modified
  + * 19990320.1   - add ap_vrprintf()
*/
   
   #define MODULE_MAGIC_COOKIE 0x41503133UL /* "AP13" */
  @@ -221,7 +222,7 @@
   #ifndef MODULE_MAGIC_NUMBER_MAJOR
   #define MODULE_MAGIC_NUMBER_MAJOR 19990320
   #endif
  -#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
  +#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR/* backward 
compat */
   
   /* Useful for testing for features. */
  
  
  
  1.49  +1 -0  apache-1.3/src/include/http_protocol.h
  
  Index: http_protocol.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/http_protocol.h,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- http_protocol.h   1999/01/01 19:04:40 1.48
  +++ http_protocol.h   1999/04/20 17:51:37 1.49
  @@ -148,6 +148,7 @@
   API_EXPORT(int) ap_rputs(const char *str, request_rec *r);
   API_EXPORT(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);
   API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r,...);
  +API_EXPORT(int) ap_vrprintf(request_rec *r, const char *fmt, va_list vlist);
   API_EXPORT_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...)
__attribute__((format(printf,2,3)));
   API_EXPORT(int) ap_rflush(request_rec *r);
  
  
  
  1.262 +22 -0 apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.261
  retrieving revision 1.262
  diff -u -r1.261 -r1.262
  --- http_protocol.c   1999/03/10 17:42:42 1.261
  +++ http_protocol.c   1999/04/20 17:51:38 1.262
  @@ -2173,6 +2173,28 @@
   return n;
   }
   
  +API_EXPORT(int) ap_vrprintf(request_rec *r, const char *fmt, va_list ap)
  +{
  +int n;
  +
  +if (r->connection->aborted)
  +return -1;
  +
  +n = ap_vbprintf(r->connection->client, fmt, ap);
  +
  +if (n < 0) {
  +if (!r->connection->aborted) {
  +ap_log_rerror(APLOG_MARK, APLOG_INFO, r,
  +"client stopped connection before vrprintf completed");
  +ap_bsetflag(r->connection->client, B_EOUT, 1);
  +r->connection->aborted = 1;
  +}
  +return -1;
  +}
  +SET_BYTES_SENT(r);
  +return n;
  +}
  +
   API_EXPORT(int) ap_rprintf(request_rec *r, const char *fmt,...)
   {
   va_list vlist;
  
  
  


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

1999-04-20 Thread dgaudet
dgaudet 99/04/20 10:27:51

  Modified:src  CHANGES
   src/modules/standard mod_mime.c
  Log:
  islower() returns true for stuff outside a-z when locale isn't C
  
  PR:   3427
  
  Revision  ChangesPath
  1.1310+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1309
  retrieving revision 1.1310
  diff -u -r1.1309 -r1.1310
  --- CHANGES   1999/04/20 17:03:25 1.1309
  +++ CHANGES   1999/04/20 17:27:47 1.1310
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.7
   
  +  *) Fix the mod_mime hash table to work properly with locales other
  + than C.  [Dean Gaudet] PR#3427
  +
 *) Fix a memory leak which is exacerbated by certain configurations.
[Dean Gaudet] PR#4225
   
  
  
  
  1.49  +2 -7  apache-1.3/src/modules/standard/mod_mime.c
  
  Index: mod_mime.c
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- mod_mime.c1999/01/01 19:05:11 1.48
  +++ mod_mime.c1999/04/20 17:27:51 1.49
  @@ -233,13 +233,8 @@
* get private versions through AddType...
*/
   
  -/* MIME_HASHSIZE used to be 27 (26 chars and one "non-alpha" slot), but
  - * with character sets like EBCDIC, this is insufficient because the
  - * range 'a'...'z' is not contigous. Defining it as ('z'-'a'+2) is
  - * equivalent to 27 in ASCII, and makes it work in EBCDIC.
  - */
  -#define MIME_HASHSIZE ('z'-'a'+2)
  -#define hash(i) (ap_isalpha(i) ? (ap_tolower(i)) - 'a' : (MIME_HASHSIZE-1))
  +#define MIME_HASHSIZE (32)
  +#define hash(i) (ap_tolower(i) % MIME_HASHSIZE)
   
   static table *hash_buckets[MIME_HASHSIZE];
   
  
  
  


cvs commit: apache-1.3/src/main http_core.c

1999-04-20 Thread dgaudet
dgaudet 99/04/20 10:03:28

  Modified:src  CHANGES
   src/main http_core.c
  Log:
  fix memory leak exacerbated by certain configurations
  
  PR:   4225
  
  Revision  ChangesPath
  1.1309+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1308
  retrieving revision 1.1309
  diff -u -r1.1308 -r1.1309
  --- CHANGES   1999/04/20 15:44:08 1.1308
  +++ CHANGES   1999/04/20 17:03:25 1.1309
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.7
   
  +  *) Fix a memory leak which is exacerbated by certain configurations.
  + [Dean Gaudet] PR#4225
  +
 *) Prevent clobbering saved IFS values in APACI. [Jim Jagielski]
   
 *) Fix buffer overflows in ap_uuencode and ap_uudecode pointed out
  
  
  
  1.259 +7 -12 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.258
  retrieving revision 1.259
  diff -u -r1.258 -r1.259
  --- http_core.c   1999/04/09 12:57:07 1.258
  +++ http_core.c   1999/04/20 17:03:27 1.259
  @@ -407,18 +407,16 @@
   int nelts;
   void **elts;
   int i;
  +pool *tmp;
   
  -/* XXX: we are about to waste some ram ... we will build a new array
  - * and we need some scratch space to do it.  The old array and the
  - * scratch space are never freed.
  - */
   sconf = ap_get_module_config(s->module_config, &core_module);
   sec = sconf->sec;
   nelts = sec->nelts;
   elts = (void **)sec->elts;
   
  -/* build our sorting space */
  -sortbin = ap_palloc(p, sec->nelts * sizeof(*sortbin));
  +/* we have to allocate tmp space to do a stable sort */
  +tmp = ap_make_sub_pool(p);
  +sortbin = ap_palloc(tmp, sec->nelts * sizeof(*sortbin));
   for (i = 0; i < nelts; ++i) {
sortbin[i].orig_index = i;
sortbin[i].elt = elts[i];
  @@ -426,15 +424,12 @@
   
   qsort(sortbin, nelts, sizeof(*sortbin), reorder_sorter);
   
  -/* and now build a new array */
  -/* XXX: uh I don't see why we can't reuse the old array, what
  - * was I thinking? -djg */
  -sec = ap_make_array(p, nelts, sizeof(void *));
  +/* and now copy back to the original array */
   for (i = 0; i < nelts; ++i) {
  - *(void **)ap_push_array(sec) = sortbin[i].elt;
  +  elts[i] = sortbin[i].elt;
   }
   
  -sconf->sec = sec;
  +ap_destroy_pool(tmp);
   }
   
   /*
  
  
  


cvs commit: apache-1.3/src/main alloc.c

1999-04-20 Thread dgaudet
dgaudet 99/04/20 09:28:47

  Modified:src/main alloc.c
  Log:
  ALLOC_STATS support... I don't think this hurts anything... but feel
  free to remove it if someone objects.
  
  Revision  ChangesPath
  1.108 +51 -0 apache-1.3/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/alloc.c,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- alloc.c   1999/04/08 11:36:33 1.107
  +++ alloc.c   1999/04/20 16:28:46 1.108
  @@ -111,6 +111,11 @@
*/
   /* #define MAKE_TABLE_PROFILE */
   
  +/* Provide some statistics on the cost of allocations.  It requires a
  + * bit of an understanding of how alloc.c works.
  + */
  +/* #define ALLOC_STATS */
  +
   #ifdef POOL_DEBUG
   #ifdef ALLOC_USE_MALLOC
   # error "sorry, no support for ALLOC_USE_MALLOC and POOL_DEBUG at the same 
time"
  @@ -171,6 +176,13 @@
   static union block_hdr *global_block_list;
   #define FREE_POOL((struct pool *)(-1))
   #endif
  +#ifdef ALLOC_STATS
  +static unsigned long long num_free_blocks_calls;
  +static unsigned long long num_blocks_freed;
  +static unsigned max_blocks_in_one_free;
  +static unsigned num_malloc_calls;
  +static unsigned num_malloc_bytes;
  +#endif
   
   #ifdef ALLOC_DEBUG
   #define FILL_BYTE((char)(0xa5))
  @@ -208,6 +220,10 @@
*/
   size += CLICK_SZ;
   #endif
  +#ifdef ALLOC_STATS
  +++num_malloc_calls;
  +num_malloc_bytes += size + sizeof(union block_hdr);
  +#endif
   blok = (union block_hdr *) malloc(size + sizeof(union block_hdr));
   if (blok == NULL) {
fprintf(stderr, "Ouch!  malloc failed in malloc_block()\n");
  @@ -261,6 +277,9 @@
free(blok);
   }
   #else
  +#ifdef ALLOC_STATS
  +unsigned num_blocks;
  +#endif
   /* 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.
  @@ -281,7 +300,13 @@
* now.
*/
   
  +#ifdef ALLOC_STATS
  +num_blocks = 1;
  +#endif
   while (blok->h.next != NULL) {
  +#ifdef ALLOC_STATS
  + ++num_blocks;
  +#endif
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);
  @@ -301,6 +326,15 @@
   /* Finally, reset next pointer to get the old free blocks back */
   
   blok->h.next = old_free_list;
  +
  +#ifdef ALLOC_STATS
  +if (num_blocks > max_blocks_in_one_free) {
  + max_blocks_in_one_free = num_blocks;
  +}
  +++num_free_blocks_calls;
  +num_blocks_freed += num_blocks;
  +#endif
  +
   (void) ap_release_mutex(alloc_mutex);
   #endif
   }
  @@ -448,6 +482,20 @@
   }
   #endif
   
  +#ifdef ALLOC_STATS
  +static void dump_stats(void)
  +{
  +fprintf(stderr,
  + "alloc_stats: [%d] #free_blocks %llu #blocks %llu max %u #malloc %u 
#bytes %u\n",
  + (int)getpid(),
  + num_free_blocks_calls,
  + num_blocks_freed,
  + max_blocks_in_one_free,
  + num_malloc_calls,
  + num_malloc_bytes);
  +}
  +#endif
  +
   pool *ap_init_alloc(void)
   {
   #ifdef POOL_DEBUG
  @@ -459,6 +507,9 @@
   alloc_mutex = ap_create_mutex(NULL);
   spawn_mutex = ap_create_mutex(NULL);
   permanent_pool = ap_make_sub_pool(NULL);
  +#ifdef ALLOC_STATS
  +atexit(dump_stats);
  +#endif
   
   return permanent_pool;
   }
  
  
  


cvs commit: apache-1.3 Makefile.tmpl

1999-04-20 Thread dgaudet
dgaudet 99/04/20 09:19:59

  Modified:.Makefile.tmpl
  Log:
  I want to be able to run "make install" as a non-root user.
  
  Revision  ChangesPath
  1.71  +2 -2  apache-1.3/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /home/cvs/apache-1.3/Makefile.tmpl,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- Makefile.tmpl 1999/04/05 20:53:05 1.70
  +++ Makefile.tmpl 1999/04/20 16:19:57 1.71
  @@ -257,8 +257,8 @@
$(MKDIR) $(root)$(runtimedir)
$(MKDIR) $(root)$(logfiledir)
$(MKDIR) $(root)$(proxycachedir)
  - chown $(conf_user) $(root)$(proxycachedir)
  - chgrp $(conf_group) $(root)$(proxycachedir)
  + -chown $(conf_user) $(root)$(proxycachedir)
  + -chgrp $(conf_group) $(root)$(proxycachedir)
@echo "<=== [mktree]"
   
   #   install the server program and optionally corresponding
  
  
  


cvs commit: apache-1.3/src CHANGES

1999-04-20 Thread jim
jim 99/04/20 08:44:10

  Modified:.configure
   src  CHANGES
  Log:
  Some APACI/configure tweaks to accomodate old
  shells. Also, we had been clobbering IFS, which looks
  like it had been harmless, but it's still not good
  practise :)
  
  Revision  ChangesPath
  1.81  +43 -26apache-1.3/configure
  
  Index: configure
  ===
  RCS file: /export/home/cvs/apache-1.3/configure,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- configure 1999/04/05 20:53:05 1.80
  +++ configure 1999/04/20 15:44:07 1.81
  @@ -219,7 +219,8 @@
   #   determine rules
   rules=''
   rulelist=''
  -OIFS="$IFS" IFS='
  +OIFS="$IFS"
  +IFS='
   '
   for rule in `grep '^Rule' $src/Configuration.tmpl`; do
   rule=`echo "$rule" | sed -e 's/^Rule[]*//'`
  @@ -236,7 +237,8 @@
   #   determine modules
   modules=''
   modulelist=''
  -OIFS="$IFS" IFS='
  +OIFS="$IFS"
  +IFS='
   '
   for module in `egrep '^[#]*(Add|Shared)Module' $src/Configuration.tmpl`; 
do
   add=yes
  @@ -267,7 +269,8 @@
   #   backward compatibility for old src/Configuration.tmpl
   #   parameter names to the canonical Autoconf-style shell
   #   variable names.
  -OIFS="$IFS" IFS="$DIFS"
  +OIFS="$IFS"
  +IFS="$DIFS"
   for var in CFLAGS LDFLAGS LIBS INCLUDES DEPS; do
   eval "val=\$EXTRA_$var"
   if [ "x$val" != "x" ]; then
  @@ -301,7 +304,8 @@
   ##  can be overridden by others.
   ##
   apc_prev=''
  -OIFS1="$IFS" IFS="$DIFS"
  +OIFS1="$IFS"
  +IFS="$DIFS"
   for apc_option
   do
   #   if previous option needs an argument, assign it.
  @@ -402,7 +406,8 @@
   -e "s/[  ]*$/'/g" \
   $file >$pldconf
   . $pldconf
  -OIFS="$IFS" IFS="$DIFS"
  +OOIFS="$IFS"  # most likely not needed: jmj
  +IFS="$DIFS"   # ditto
   for var in prefix exec_prefix bindir sbindir libexecdir mandir \
  sysconfdir datadir includedir localstatedir 
runtimedir \
  logfiledir proxycachedir; do
  @@ -418,7 +423,7 @@
   ;;
   esac
   done
  -IFS="$OIFS"
  +IFS="$OOIFS"
   rm -f $pldconf 2>/dev/null
   if [ "x$prefix" = "xUNSET" ]; then
   echo "configure:Error: Path layout definition not found or 
incorrect" 1>&2
  @@ -441,7 +446,6 @@
   ##
   addconf_created=0
   apc_prev=''
  -OIFS1="$IFS" IFS="$DIFS"
   for apc_option
   do
   #   if previous option needs an argument, assign it.
  @@ -679,18 +683,20 @@
   module ) 
   case $apc_optarg in
  all ) 
  -   OIFS="$IFS" IFS=':'
  +   OOIFS="$IFS"
  +   IFS=':'
  for module in $modules; do
  eval "module_${module}=yes" 
  done
  -   IFS="$OIFS"
  +   IFS="$OOIFS"
  ;;
  most ) 
  -   OIFS="$IFS" IFS=':'
  +   OOIFS="$IFS"
  +   IFS=':'
  for module in $modules; do
  eval "module_${module}=yes" 
  done
  -   IFS="$OIFS"
  +   IFS="$OOIFS"
  module_auth_db=no # not all platforms have 
-ldb
  module_mmap_static=no # not all platforms have 
mmap()
  module_so=no  # not all platforms have 
dlopen()
  @@ -711,15 +717,17 @@
   shared ) 
   case $apc_optarg in
  max ) 
  -   OIFS="$IFS" IFS=':'
  +   OOIFS="$IFS"
  +   IFS=':'
  for module in $modules; do
  eval "shared_${module}=yes" 
  done
  -   IFS="$OIFS"
  +   IFS="$OOIFS"
  shared_so=no# because of bootstrapping
  ;;
  remain ) 
  -   OIFS="$IFS" IFS=':'
  +   OOIFS="$IFS"
  +   IFS=':'
  for module in $modules; do
  eval "add=\$module_${module}" 
  if [ "x$add" = "xno" ]; then
  @@ -727,7 +735,7 @@
  eval "shared_${module}=yes" 
  fi
  done
 

cvs commit: apache-apr/docs threadproc.txt

1999-04-20 Thread rbb
rbb 99/04/20 08:12:27

  Added:   docs threadproc.txt
  Log:
  First pass at thread/process API's for apr.
  
  Revision  ChangesPath
  1.1  apache-apr/docs/threadproc.txt
  
  Index: threadproc.txt
  ===
  ---Thread/Process abstraction
   apr_thread_t *apr_create_thread(void * (void *), void *,
  APRUInt32)
Create a new thread
   Arguments:
arg 1)  pointer to the root function of the new thread.  This function
is called when the thread is created.  Returning from this
function is the only way to terminate the thread.
arg 2)  parameter to pass to thread's root func.
arg 3)  size of the stack in bytes.  IF zero, APR chooses the machine
specific default size.
return) The thread created.
  
  apr_int32_t apr_fork(apr_proc_t *)
  create a new process with a copy of the currently executing address 
space.
   Arguments:
  arg 1)  the proccess type for the newly created process.
  return) status.  APR_FAILURE on error, 0 if child process, 1 if 
original
  process.
  NOTE:  This is a non-portable call.  It cannot be avoided, and any system 
that 
 can create this function should do so.  Any platform that is not able
 to produce this function should define it as NULL, so that there are
 no compile time errors. 
  
  apr_status_t apr_createprocattr_init(apr_procattr_t *);
  create a new process attr type with OS dependant defaults
   Arguments:
  arg 1)  New process attribute type.
  return) APR_SUCCESS or APR_FAILURE.
  
  apr_status_t apr_setprocattr_io(apr_procattr_t *, apr_int32_t, apr_int32_t, 
apr_int32_t)
  setup stdin, stdout, and stderr attributes for the new proc
   Arguments
  arg 1)  the process attr to modify
  arg 2)  Should we setup a pipe for stdin? 1 yes, 0 no. 
  arg 3)  Should we setup a pipe for stdout? 1 yes, 0 no
  arg 4)  Should we setup a pipe for stderr? 1 yes, 0 no.
  return) APR_SUCCESS or APR_FAILURE
  NOTE:  the file structures are a part of the process atr variable.  They are
 created and filled out by this func. 
  
  apr_status_t apr_setprocattr_dir(apr_procattr_t *, char *)
 define starting directory for new process.
   Arguments
 arg 1)  The process attr to modify
 arg 2)  The starting directory for the new process.
 return) APR_SUCCESS or APR_FAILURE
  
  apr_proc_t *apr_create_process(char *, char **, char **, const apr_procattr_t 
*)
create a new process and run a new executable in it.
   Arguments:
arg 1)  Path name of the executable file 
arg 2)  array of Command line arguments to executable
arg 3)  array of environment strings of the form name=value.
If NULL, inherit environ from parent.
arg 4)  a pointer to structure that describes the attributes of the new
process.  If NULL, process will have the default attributes.
return) Process description structure.
   APRStatus apr_procsetcurrdir(APRPROCESSATTR *, char *);
change the current directory of the process attribute structure.
   Arguments:
arg 1)  Structure to change the dir in.
arg 2)  Path to change the directory to in the APRPROCESSATTR struct.
  
   APRStatus  apr_get_thread_private(APRUInt32, APThdPriv)
  Get the thread private data for the current thread
   Arguments:
arg 1)  index into thread private data table
arg 2)  the thread private data structure.  NULL if thread private
 has not been set.
   APRStatus apr_set_thread_private(APRUInt32, APRThdPriv)
Set per-thread private data.
   Arguments:
arg 1)  index into thread private data table
arg 2)  pointer to per-thread private data structure.
   APRStatus apr_newthreadprivateIndex(APRUInt32, APRThdDestFn)
Returns a new index for the thread-private data table and can associate
a destructor with the data that has been assigned to the index.
   Arguments:
arg 1)  On output this is an index into the thread-private data table
that is valid for all threads in the current process.
arg 2)  a destructor function for use with the data associated with
the returned index.
  
  
   IMPLEMENTATION DETAILS **   
  
  struct apr_thread_t {
  pthread_t td;
  

  
  
  


cvs commit: apache-apr/docs time.txt

1999-04-20 Thread rbb
rbb 99/04/20 08:08:49

  Added:   docs time.txt
  Log:
  First pass at time api's for apr.
  
  Revision  ChangesPath
  1.1  apache-apr/docs/time.txt
  
  Index: time.txt
  ===
  Time
  
These are absolutly necessary.  They allow Apache to ensure it is free
of any y2k or 2038 bugs, because we write our own timing routines.  I
am using seconds instead of milliseconds, because HTTP says we only
need second granularity, if this is not granular enough, it is easy to
change later.
   APRStatus apr_current_time(APRTime *)
Returns the number of seconds since the epoch.  define the epoch
as midnight January 1, 1970, UTC.
   Arguments:
arg 1) current time on local machine.
   APRStatus apr_implode_time(const APRExplodedTime *, APRTime)
Convert exploded time format into an APRTime value.
   Arguments:
arg 1)  Time to convert in Exploded format
arg 2)  converted time as seconds since epoch
   APRStatus apr_format_time(char *, APRUInt32, char *, APRExplodedTime,
   APRUInt32);
Format time into a buffer.
   Arguments:
arg 1)  Buffer to store string into
arg 2)  size of buffer.  Truncate if buffer not long enough
arg 3)  format to convert to.  Use strftime formats (see posix 
reference above)
arg 4)  Time variable to convert
arg 5)  number of bytes of buffer used.
   APRStatus apr_explode_time(APRTime, APRTimePARAMFN, APRExplodedTime);
Convert APRTime vlaue into an expanded time format.
   Arguments:
arg 1)  number of seconds since the epoch to convert to Expanded time
arg 2)  Time parameter function of the specified time zone.
arg 3)  structure to store expanded time into
  
  
  


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

1999-04-20 Thread dirkx
dirkx   99/04/20 05:03:29

  Modified:src/support ab.c
  Log:
  Following the change in
  
   1.159 +4 -0  apache-1.3/src/main/util.c
  
  UUencode in ab has also been updated. Though I seriously doubt
  if ab has ever been tested in an EBCDIC environment :-) Does it
  actually work Martin ?
  
  Dw.
  
  Revision  ChangesPath
  1.22  +34 -12apache-1.3/src/support/ab.c
  
  Index: ab.c
  ===
  RCS file: /home/cvs/apache-1.3/src/support/ab.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- ab.c  1999/04/05 13:52:21 1.21
  +++ ab.c  1999/04/20 12:03:29 1.22
  @@ -248,20 +248,42 @@
   char *p;
   char *encoded = (char *) malloc((len + 2) / 3 * 4 + 1);
   p = encoded;
  -for (i = 0; i < len; i += 3) {
  - *p++ = basis_64[string[i] >> 2];
  - *p++ = basis_64[((string[i] & 0x3) << 4) |
  - ((int) (string[i + 1] & 0xF0) >> 4)];
  - *p++ = basis_64[((string[i + 1] & 0xF) << 2) |
  - ((int) (string[i + 2] & 0xC0) >> 6)];
  - *p++ = basis_64[string[i + 2] & 0x3F];
  -};
  -*p-- = '\0';
  -*p-- = '=';
  -*p-- = '=';
  +#ifndef CHARSET_EBCDIC
  +for (i = 0; i < len-2; i += 3) {
  +*p++ = basis_64[(string[i] >> 2) & 0x3F];
  +*p++ = basis_64[((string[i] & 0x3) << 4) | ((int) (string[i + 1] & 
0xF0) >> 4)];
  +*p++ = basis_64[((string[i + 1] & 0xF) << 2) | ((int) (string[i + 2] 
& 0xC0) >> 6)];
  +*p++ = basis_64[string[i + 2] & 0x3F];
  +}
  +if (i < len) {
  +*p++ = basis_64[(string[i] >> 2) & 0x3F];
  +*p++ = basis_64[((string[i] & 0x3) << 4) | ((int) (string[i + 1] & 
0xF0) >> 4)];
  +if (i == (len-2))
  +   *p++ = basis_64[((string[i + 1] & 0xF) << 2)];
  +else
  +   *p++ = '=';
  +*p++ = '=';
  +}
  +#else /*CHARSET_EBCDIC*/
  +for (i = 0; i < len-2; i += 3) {
  +*p++ = basis_64[(os_toascii[string[i]] >> 2) & 0x3F];
  +*p++ = basis_64[((os_toascii[string[i]] & 0x3) << 4) | ((int) 
(os_toascii[string[i + 1]] & 0xF0) >> 4)];
  +*p++ = basis_64[((os_toascii[string[i + 1]] & 0xF) << 2) | ((int) 
(os_toascii[string[i + 2]] & 0xC0) >> 6)];
  +*p++ = basis_64[os_toascii[string[i + 2]] & 0x3F];
  +}
  +if (i < len) {
  +   *p++ = basis_64[(os_toascii[string[i]] >> 2) & 0x3F];
  +   *p++ = basis_64[((os_toascii[string[i]] & 0x3) << 4) | ((int) 
(os_toascii[string[i + 1]] & 0xF0) >> 4)];
  +   if (i == (len-2))
  +   *p++ = basis_64[((os_toascii[string[i + 1]] & 0xF) << 2)];
  +   else
  +   *p++ = '=';
  +   *p++ = '=';
  +}
  +#endif /*CHARSET_EBCDIC*/
  +*p = '\0';
   return encoded;
   }
  -
   
   /* - */
   
  
  
  


cvs commit: apache-apr/pthreads/src Configure

1999-04-20 Thread fielding
fielding99/04/19 22:29:42

  Modified:pthreads/src Configure
  Log:
  CFLAGS and library needed to compile pthreads on Solaris.
  
  Revision  ChangesPath
  1.9   +2 -2  apache-apr/pthreads/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/Configure,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Configure 1999/03/17 17:00:35 1.8
  +++ Configure 1999/04/20 05:29:41 1.9
  @@ -542,8 +542,8 @@
   *-solaris2*)
PLATOSVERS=`echo $PLAT | sed 's/^.*solaris2.//'`
OS="Solaris $PLATOSVERS"
  - CFLAGS="$CFLAGS -DSOLARIS2=$PLATOSVERS"
  - LIBS="$LIBS -lsocket -lnsl"
  + CFLAGS="$CFLAGS -DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS"
  + LIBS="$LIBS -lsocket -lnsl -lpthread"
DBM_LIB=""
case "$PLATOSVERS" in
2[01234]*)
  
  
  


cvs commit: apache-apr/pthreads/src/main http_main.c

1999-04-20 Thread manoj
manoj   99/04/19 18:43:05

  Modified:pthreads/src/main http_main.c
  Log:
  Fix comment wrapping.
  
  Revision  ChangesPath
  1.76  +5 -5  apache-apr/pthreads/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_main.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -u -r1.75 -r1.76
  --- http_main.c   1999/04/20 01:31:03 1.75
  +++ http_main.c   1999/04/20 01:43:04 1.76
  @@ -2151,11 +2151,11 @@
 */
if (status <= SERVER_READY) {
++ idle_thread_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
  -  * tend to service more hits (and hence are more likely to have
  -  * their data in cpu caches).
  +/* 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 tend to service more hits (and hence are more
  + * likely to have their data in cpu caches).
 */
}
}
  
  
  


cvs commit: apache-apr/pthreads/src/main http_main.c

1999-04-20 Thread manoj
manoj   99/04/19 18:31:04

  Modified:pthreads/src/main http_main.c
  Log:
  Bug fix for scoreboard handling. Before, if only a single child thread
  was dead, we assumed that the whole child was dead and reused its slot,
  even if there are other threads still running in that process slot.
  
  Now, we actually check two conditions: any_dying_threads and
  all_dead_threads. If any_dying_threads, we make sure not to count this
  as a non-dead process that can be told to die. If all_dead_threads, we
  can reuse the process slot.
  
  Revision  ChangesPath
  1.75  +38 -29apache-apr/pthreads/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_main.c,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -u -r1.74 -r1.75
  --- http_main.c   1999/04/17 05:10:18 1.74
  +++ http_main.c   1999/04/20 01:31:03 1.75
  @@ -1934,6 +1934,7 @@
   sigset_t sig_mask;
   int signal_received;
   pthread_t thread;
  +int j;
   
   my_pid = getpid();
   
  @@ -1982,6 +1983,13 @@
   switch (signal_received) {
   case SIGWINCH:
graceful_sig_handler(SIGWINCH);
  + for (j = 0; j < ap_threads_per_child + ap_acceptors_per_child; 
  +  j++) { 
  +/* Useful for debugging */
  +if (ap_scoreboard_image->servers[child_num_arg][j].status != 
SERVER_DEAD) {
  +ap_scoreboard_image->servers[child_num_arg][j].status = 
SERVER_GRACEFUL;
  +}
  + } 
   graceful_killer();
   clean_child_exit(0);
break;
  @@ -2121,47 +2129,48 @@
/* Initialization to satisfy the compiler. It doesn't know
 * that ap_threads_per_child is always > 0 */
int status = SERVER_DEAD;
  - idle_thread_count = 0;
  + int any_dying_threads = 0;
  + int all_dead_threads = 1;
   
  + idle_thread_count = 0;
if (i >= max_daemons_limit && free_length == idle_spawn_rate)
break;
for (j = 0; j < ap_threads_per_child; j++) {
   ss = &ap_scoreboard_image->servers[i][j];
status = ss->status;
  - if (status == SERVER_DEAD) {
  - /* try to keep children numbers as low as possible */
  - if (free_length < idle_spawn_rate) {
  - free_slots[free_length] = i;
  - ++free_length;
  - /* We are killing this process, let's leave the loop */
  - break;
  - }
  - }
  - else {
  - /* We consider a starting server as idle because we started it
  -  * at least a cycle ago, and if it still hasn't finished 
starting
  -  * then we're just going to swamp things worse by forking more.
  -  * So we hopefully won't need to fork more if we count it.
  -  * This depends on the ordering of SERVER_READY and 
SERVER_STARTING.
  +
  + any_dying_threads = any_dying_threads || (status == SERVER_DEAD)
  +|| (status == SERVER_GRACEFUL);
  + all_dead_threads = all_dead_threads && (status == SERVER_DEAD);
  +
  + /* We consider a starting server as idle because we started it
  +  * at least a cycle ago, and if it still hasn't finished starting
  +  * then we're just going to swamp things worse by forking more.
  +  * So we hopefully won't need to fork more if we count it.
  +  * This depends on the ordering of SERVER_READY and SERVER_STARTING.
  +  */
  + if (status <= SERVER_READY) {
  + ++ idle_thread_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
  +  * tend to service more hits (and hence are more likely to have
  +  * their data in cpu caches).
 */
  - if (status <= SERVER_READY) {
  - ++ idle_thread_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
  -  * tend to service more hits (and hence are more likely to 
have
  -  * their data in cpu caches).
  -  */
  - }
}
}
  - if (idle_thread_count > ap_idle_thread_threshold) {
  - idle_count++;
  - to_kill = i;
  + if (all_dead_threads && free_length < idle_spawn_rate) {
  + free_slots[free_length] = i;
  + ++free_length;
}
  -if (status != SE