Re: cvs commit: apache-2.0/mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.h Makefile.tmpl acceptlock.c acceptlock.h http_accept.c mpmt_pthread.c scoreboard.c

1999-06-28 Thread Dean Gaudet


On 27 Jun 1999 [EMAIL PROTECTED] wrote:

   Index: ap_listen.h
   ===
   RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_listen.h,v
   retrieving revision 1.1
   retrieving revision 1.2
   diff -u -d -u -r1.1 -r1.2
   --- ap_listen.h 1999/06/25 01:25:05 1.1
   +++ ap_listen.h 1999/06/27 03:45:13 1.2
   @@ -64,6 +64,7 @@
struct sockaddr_in local_addr; /* local IP address and port */
/* TODO: replace the fd with APR stuff */
int fd;
   +int index; /* index into pollfd array */
/* more stuff here, like which protocol is bound to the port */
};

Actually I would rather you allocate your own structures in your MPM for
this index ... or maybe someone can figure out a better Listen
abstraction.  Your index field is related to how your MPM accepts
incoming connections, and not all MPMs will do it that way. 

For your use of poll() I'm not sure why you need the index actually... 
don't you just need to set up an array of pollfds, and all the info you
need is in struct pollfd ?  The fd is there... 

At some point when we add protocol/transport layer abstraction you'll need
to know what protocol/transport is bound to the socket.  But then you
could just allocate two arrays with common indicies. 

Dean





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

1998-12-29 Thread Dean Gaudet


On 29 Dec 1998 [EMAIL PROTECTED] wrote:

 dgaudet 98/12/29 10:28:11
 
   Modified:src/modules/standard mod_negotiation.c
   Log:
   The US is the only English speaking country which uses these misspellings, 
 I'm Canadian.
   
   Revision  ChangesPath
   1.89  +1 -1  apache-1.3/src/modules/standard/mod_negotiation.c

p.s. this was directed at Roy who corrected my spelling in his recent
mod_negotiation commit ;)

Dean



Re: cvs commit: apache-1.3/src/regex engine.c regcomp.c

1998-07-08 Thread Dean Gaudet
It's already in hsregex.h, or at least it was when I committed it.  Both
of these should be completely unnecessary.  Why did you add them?

Dean

On 8 Jul 1998 [EMAIL PROTECTED] wrote:

 brian   98/07/08 11:47:14
 
   Modified:src/regex engine.c regcomp.c
   Log:
   I'm assuming this is the right place to do this, though on reflection
   maybe /include/hsregex.h would be better, I'm not sure.  This fixes it
   for now.
   
   Revision  ChangesPath
   1.4   +1 -0  apache-1.3/src/regex/engine.c
   
   Index: engine.c
   ===
   RCS file: /export/home/cvs/apache-1.3/src/regex/engine.c,v
   retrieving revision 1.3
   retrieving revision 1.4
   diff -u -r1.3 -r1.4
   --- engine.c1998/07/08 17:47:26 1.3
   +++ engine.c1998/07/08 18:47:13 1.4
   @@ -46,6 +46,7 @@
};

#include engine.ih
   +#include apctype.h

#ifdef REDEBUG
#defineSP(t, s, c) print(m, t, s, c, stdout)
   
   
   
   1.7   +1 -0  apache-1.3/src/regex/regcomp.c
   
   Index: regcomp.c
   ===
   RCS file: /export/home/cvs/apache-1.3/src/regex/regcomp.c,v
   retrieving revision 1.6
   retrieving revision 1.7
   diff -u -r1.6 -r1.7
   --- regcomp.c   1998/07/08 17:47:27 1.6
   +++ regcomp.c   1998/07/08 18:47:13 1.7
   @@ -6,6 +6,7 @@
#include stdlib.h

#include hsregex.h
   +#include apctype.h
#include utils.h
#include regex2.h

   
   
   
 



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

1998-03-15 Thread Dean Gaudet


On 15 Mar 1998 [EMAIL PROTECTED] wrote:

   - Perform more comparisons at compile-time in order to speed up things
 at compile-time.

Er, perform more comparisons at config-time in order to speed up things
at run-time.

Dean



Re: cvs commit: apache/htdocs/manual/mod mod_auth_anon.html mod_example.html mod_mime.html mod_proxy.html

1997-11-02 Thread Dean Gaudet
Aw shoot, this one is screwed up. 

Dean

On 2 Nov 1997 [EMAIL PROTECTED] wrote:

 dgaudet 97/11/01 16:16:11
 
   Modified:htdocs/manual Tag: APACHE_1_2_X LICENSE install.html
 invoking.html suexec.html vhosts-in-depth.html
htdocs/manual/misc Tag: APACHE_1_2_X FAQ.html
 compat_notes.html fin_wait_2.html perf.html
htdocs/manual/mod Tag: APACHE_1_2_X mod_auth_anon.html
 mod_example.html mod_mime.html mod_proxy.html
   Log:
   yet more merges from 1.3
   
   Revision  ChangesPath
   No   revision
   
   
   No   revision
   
   
   1.3.2.1   +2 -1  apache/htdocs/manual/LICENSE
   
   Index: LICENSE
   ===
   RCS file: /export/home/cvs/apache/htdocs/manual/LICENSE,v
   retrieving revision 1.3
   retrieving revision 1.3.2.1
   diff -u -r1.3 -r1.3.2.1
   --- LICENSE 1997/01/01 18:32:13 1.3
   +++ LICENSE 1997/11/02 00:15:58 1.3.2.1
   @@ -20,7 +20,8 @@
 *
 * 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.
   + *prior written permission. For written permission, please contact
   + *[EMAIL PROTECTED]
 *
 * 5. Redistributions of any form whatsoever must retain the following
 *acknowledgment:
   
   
   
   1.9.2.2   +8 -3  apache/htdocs/manual/install.html
   
   Index: install.html
   ===
   RCS file: /export/home/cvs/apache/htdocs/manual/install.html,v
   retrieving revision 1.9.2.1
   retrieving revision 1.9.2.2
   diff -u -r1.9.2.1 -r1.9.2.2
   --- install.html1997/11/01 23:39:21 1.9.2.1
   +++ install.html1997/11/02 00:15:59 1.9.2.2
   @@ -51,7 +51,7 @@
 LI
  Select modules to compile into Apache in the
  CODEConfiguration/CODE file. Uncomment lines corresponding to
   -  those optional modules you wish to include (among the Module lines
   +  those optional modules you wish to include (among the AddModule lines
  at the bottom of the file), or add new lines corresponding to
  additional modules you have downloaded or written. (See A
  HREF=misc/API.htmlAPI.html/A for preliminary docs on how to
   @@ -83,7 +83,12 @@
 + configured for lt;whatevergt; platform
 + setting C compiler to lt;whatevergt; *
 + setting C compiler optimization-level to lt;whatevergt; *
   -%
   + + Adding selected modules
   + + doing sanity check on compiler and options
   +Creating Makefile in support
   +Creating Makefile in main
   +Creating Makefile in os/unix
   +Creating Makefile in modules/standard
   /PRE
  /BLOCKQUOTE

   @@ -159,7 +164,7 @@

To start the server, simply run CODEhttpd/CODE. This will look for
CODEhttpd.conf/CODE in the location compiled into the code (by
   -default CODE/usr/local/etc/httpd/conf/httpd.conf/CODE). If
   +default CODE/usr/local/apache/conf/httpd.conf/CODE). If
this file is somewhere else, you can give the real
location with the -f argument. For example:

   
   
   
   1.11.2.2  +1 -1  apache/htdocs/manual/invoking.html
   
   Index: invoking.html
   ===
   RCS file: /export/home/cvs/apache/htdocs/manual/invoking.html,v
   retrieving revision 1.11.2.1
   retrieving revision 1.11.2.2
   diff -u -r1.11.2.1 -r1.11.2.2
   --- invoking.html   1997/11/01 23:39:21 1.11.2.1
   +++ invoking.html   1997/11/02 00:16:00 1.11.2.2
   @@ -30,7 +30,7 @@
ddSet the initial value for the
A HREF=mod/core.html#serverrootServerRoot/A variable to
emserverroot/em. This can be overridden by the ServerRoot command in 
 the
   -configuration file. The default is code/usr/local/etc/httpd/code.
   +configuration file. The default is code/usr/local/apache/code.

dtcode-f/code emconfig/em
ddExecute the commands in the file emconfig/em on startup. If
   
   
   
   1.11.2.3  +6 -6  apache/htdocs/manual/suexec.html
   
   Index: suexec.html
   ===
   RCS file: /export/home/cvs/apache/htdocs/manual/suexec.html,v
   retrieving revision 1.11.2.2
   retrieving revision 1.11.2.3
   diff -u -r1.11.2.2 -r1.11.2.3
   --- suexec.html 1997/11/01 23:39:25 1.11.2.2
   +++ suexec.html 1997/11/02 00:16:00 1.11.2.3
   @@ -326,14 +326,14 @@
  * transactions and errors logged for auditing and
  * debugging purposes.
  */
   - #define LOG_EXEC /usr/local/etc/httpd/logs/cgi.log /* Need me? */
   + #define LOG_EXEC /usr/local/apache/logs/cgi.log /* Need me? */

 /*
  * DOC_ROOT -- Define as the DocumentRoot set for Apache.  

cvs commit: apachen/src/main httpd.h

1997-10-08 Thread Dean Gaudet
dgaudet 97/10/08 01:42:57

  Modified:src/main httpd.h
  Log:
  Rolling 1.3b1.
  
  Revision  ChangesPath
  1.154 +1 -1  apachen/src/main/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/httpd.h,v
  retrieving revision 1.153
  retrieving revision 1.154
  diff -u -r1.153 -r1.154
  --- httpd.h   1997/10/07 20:05:02 1.153
  +++ httpd.h   1997/10/08 08:42:55 1.154
  @@ -342,7 +342,7 @@
* Example: Apache/1.1.0 MrWidget/0.1-alpha 
*/
   
  -#define SERVER_BASEVERSION Apache/1.3b1-dev/* SEE COMMENTS ABOVE */
  +#define SERVER_BASEVERSION Apache/1.3b1/* SEE COMMENTS ABOVE */
   #ifdef SERVER_SUBVERSION
   #define SERVER_VERSION   SERVER_BASEVERSION   SERVER_SUBVERSION
   #else
  
  
  


cvs commit: apachen/src/main httpd.h

1997-10-08 Thread Dean Gaudet
dgaudet 97/10/08 01:46:03

  Modified:src/main httpd.h
  Log:
  oh foo whatever I think this is right
  
  Revision  ChangesPath
  1.155 +1 -1  apachen/src/main/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/httpd.h,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- httpd.h   1997/10/08 08:42:55 1.154
  +++ httpd.h   1997/10/08 08:46:01 1.155
  @@ -353,7 +353,7 @@
   /* Numeric release version identifier: major minor bugfix betaseq
* Always increases along the same track as the source branch.
*/
  -#define APACHE_RELEASE 103
  +#define APACHE_RELEASE 1030001
   
   #define SERVER_PROTOCOL HTTP/1.1
   #ifndef SERVER_SUPPORT
  
  
  


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

1997-10-08 Thread Dean Gaudet
dgaudet 97/10/08 14:18:20

  Modified:src/modules/standard mod_mime.c
  Log:
  death to manifest constants!
  
  Revision  ChangesPath
  1.25  +1 -1  apachen/src/modules/standard/mod_mime.c
  
  Index: mod_mime.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_mime.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_mime.c1997/09/18 18:49:39 1.24
  +++ mod_mime.c1997/10/08 21:18:19 1.25
  @@ -206,7 +206,7 @@
   exit(1);
   }
   
  -for (x = 0; x  27; x++)
  +for (x = 0; x  MIME_HASHSIZE; x++)
   hash_buckets[x] = make_table(p, 10);
   
   while (!(cfg_getline(l, MAX_STRING_LEN, f))) {
  
  
  

Received: (qmail 13995 invoked by uid 6000); 12 Oct 1997 22:33:23 -
Received: (qmail 13977 invoked by uid 24); 12 Oct 1997 22:33:21 -
Date: 12 Oct 1997 22:33:21 -
Message-ID: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: cvs commit: apache-site/mirrors mirrors.list index.html
Sender: [EMAIL PROTECTED]
Precedence: bulk
Reply-To: new-httpd@apache.org

brian   97/10/12 15:33:21

  Modified:mirrors  mirrors.list index.html
  Log:
  New Isreali mirror.
  
  Revision  ChangesPath
  1.28  +2 -0  apache-site/mirrors/mirrors.list
  
  Index: mirrors.list
  ===
  RCS file: /export/home/cvs/apache-site/mirrors/mirrors.list,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mirrors.list  1997/08/11 02:04:14 1.27
  +++ mirrors.list  1997/10/12 22:33:19 1.28
  @@ -36,6 +36,7 @@
   http il  http://www.linux.org.il/apache/ [EMAIL PROTECTED]
   http il  http://download.netvision.net.il/apache/[EMAIL 
PROTECTED]
   http il  http://www.ibm.net.il/apache/   [EMAIL PROTECTED]
  +http il  http://bioinformatics.weizmann.ac.il/software/apache/   [EMAIL 
PROTECTED]
   http it  http://www.nonsoloweb.it/apache/[EMAIL PROTECTED]
   http it  http://mathema.it/pub/apache/   [EMAIL PROTECTED]
   http it  http://www.itb.it/apache/   [EMAIL PROTECTED]
  @@ -128,6 +129,7 @@
   ftp  il  ftp://ftp.rifkin.technion.ac.il/pub/apache/
   ftp  il  ftp://apache.linux.org.il/pub/linux/apache/dist/
   ftp  il  ftp://download.netvision.net.il/pub/mirrors/apache
  +ftp  il  ftp://bioinformatics.weizmann.ac.il/pub/software/apache/
   ftp  it  ftp://ftp.nonsoloweb.it/apache/dist/
   ftp  it  ftp://mathema.it/pub/apache/dist/
   ftp  jp  ftp://ring.aist.go.jp/archives/net/apache/dist/
  
  
  
  1.15  +4 -0  apache-site/mirrors/index.html
  
  Index: index.html
  ===
  RCS file: /export/home/cvs/apache-site/mirrors/index.html,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- index.html1997/08/11 02:04:13 1.14
  +++ index.html1997/10/12 22:33:19 1.15
  @@ -99,6 +99,8 @@
   !-- [EMAIL PROTECTED] --
   A HREF=http://www.ibm.net.il/apache/;il/A -
   !-- [EMAIL PROTECTED] --
  +A HREF=http://bioinformatics.weizmann.ac.il/software/apache/;il/A -
  +!-- [EMAIL PROTECTED] --
   A HREF=http://www.nonsoloweb.it/apache/;it/A -
   !-- [EMAIL PROTECTED] --
   A HREF=http://mathema.it/pub/apache/;it/A -
  @@ -285,6 +287,8 @@
   A HREF=ftp://apache.linux.org.il/pub/linux/apache/dist/;il/A -
   !--  --
   A HREF=ftp://download.netvision.net.il/pub/mirrors/apache;il/A -
  +!--  --
  +A HREF=ftp://bioinformatics.weizmann.ac.il/pub/software/apache/;il/A -
   !--  --
   A HREF=ftp://ftp.nonsoloweb.it/apache/dist/;it/A -
   !--  --
  
  
  


cvs commit: apachen/src/main httpd.h

1997-10-07 Thread Dean Gaudet
dgaudet 97/10/06 23:24:57

  Modified:src/main httpd.h
  Log:
  yet more __attribute__ goodness, let gcc lint us better
  
  Revision  ChangesPath
  1.151 +2 -1  apachen/src/main/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/httpd.h,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- httpd.h   1997/09/26 03:52:10 1.150
  +++ httpd.h   1997/10/07 06:24:55 1.151
  @@ -883,7 +883,8 @@
   /*
* Redefine assert() to something more useful for an Apache...
*/
  -API_EXPORT(void) log_assert(const char *szExp, const char *szFile, int 
nLine);
  +API_EXPORT(void) log_assert(const char *szExp, const char *szFile, int nLine)
  + __attribute__((noreturn));
   #define ap_assert(exp) (void)( (exp) || (log_assert(#exp, __FILE__, 
__LINE__), 0) )
   
   /* The optimized timeout code only works if we're not MULTITHREAD and we're
  
  
  


cvs commit: apachen/src/main http_vhost.c http_vhost.h Makefile.tmpl http_conf_globals.h http_config.c http_config.h http_core.c http_main.c http_protocol.c httpd.h

1997-10-07 Thread Dean Gaudet
dgaudet 97/10/07 12:34:11

  Modified:src/main Makefile.tmpl http_conf_globals.h http_config.c
http_config.h http_core.c http_main.c
http_protocol.c httpd.h
  Added:   src/main http_vhost.c http_vhost.h
  Log:
  The final vhost revamp?  Maybe?  Who knows.  This is yet another vhost
  revamp.  This adds the NameVirtualHost directive which explicitly indicates
  which ip:port pairs are to be used for name-vhosts.  It strictly enforces
  these pools of name-vhosts, so that you can only make requests against the
  hosts in the pool associated with the ip:port connected to.  It ignores
  the port portion of the Host: header, trusting the socket port instead.
  
  All vhost matching functions have been moved into http_vhost.[ch] to make
  things a little easier to understand.
  
  Reviewed by:  Roy Fielding, Martin Kraemer
  
  Revision  ChangesPath
  1.5   +5 -4  apachen/src/main/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apachen/src/main/Makefile.tmpl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.tmpl 1997/09/10 20:05:37 1.4
  +++ Makefile.tmpl 1997/10/07 19:33:56 1.5
  @@ -11,7 +11,7 @@
   OBJS= alloc.o http_main.o http_core.o http_config.o http_request.o \
 http_log.o http_protocol.o rfc1413.o util.o util_script.o buff.o\
 md5c.o util_md5.o explain.o http_bprintf.o util_date.o util_snprintf.o \
  -  fnmatch.o
  +  fnmatch.o http_vhost.o
   
   .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $
  @@ -46,7 +46,7 @@
   http_bprintf.o: http_bprintf.c httpd.h conf.h alloc.h buff.h
   http_config.o: http_config.c httpd.h conf.h alloc.h buff.h \
http_config.h http_core.h http_log.h http_request.h \
  - http_conf_globals.h explain.h
  + http_conf_globals.h explain.h http_vhost.h
   http_core.o: http_core.c httpd.h conf.h alloc.h buff.h http_config.h \
http_core.h http_protocol.h http_conf_globals.h http_main.h \
http_log.h rfc1413.h util_md5.h md5.h scoreboard.h fnmatch.h
  @@ -54,10 +54,11 @@
http_core.h http_log.h
   http_main.o: http_main.c httpd.h conf.h alloc.h buff.h http_main.h \
http_log.h http_config.h http_protocol.h http_request.h \
  - http_conf_globals.h http_core.h scoreboard.h multithread.h explain.h
  + http_conf_globals.h http_core.h scoreboard.h multithread.h explain.h \
  + http_vhost.h
   http_protocol.o: http_protocol.c httpd.h conf.h alloc.h buff.h \
http_config.h http_core.h http_protocol.h http_main.h http_log.h \
  - util_date.h
  + util_date.h http_vhost.h
   http_request.o: http_request.c httpd.h conf.h alloc.h buff.h \
http_config.h http_request.h http_core.h http_protocol.h http_log.h \
http_main.h scoreboard.h fnmatch.h
  
  
  
  1.18  +0 -2  apachen/src/main/http_conf_globals.h
  
  Index: http_conf_globals.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_conf_globals.h,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- http_conf_globals.h   1997/08/05 06:02:40 1.17
  +++ http_conf_globals.h   1997/10/07 19:33:57 1.18
  @@ -87,8 +87,6 @@
   extern char server_root[MAX_STRING_LEN];
   extern char server_confname[MAX_STRING_LEN];
   
  -extern server_rec_chain *vhash_table[VHASH_TABLE_SIZE + VHASH_EXTRA_SLOP];
  -
   /* We want this to have the least chance of being correupted if there
* is some memory corruption, so we allocate it statically.
*/
  
  
  
  1.81  +10 -112   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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- http_config.c 1997/09/16 00:17:59 1.80
  +++ http_config.c 1997/10/07 19:33:58 1.81
  @@ -73,6 +73,7 @@
   #include http_log.h/* for errors in parse_htaccess */
   #include http_request.h/* for default_handler (see invoke_handler) */
   #include http_conf_globals.h   /* Sigh... */
  +#include http_vhost.h
   #include explain.h
   
   DEF_Explain
  @@ -1019,96 +1020,11 @@
   return OK;
   }
   
  -/*
  - *
  - * Virtual host stuff; note that the commands that invoke this stuff
  - * are with the command table in http_core.c.
  - */
   
  -/*
  - * Parses a host of the form address[:port]
  - * paddr is used to create a list in the order of input
  - * **paddr is the -next pointer of the last entry (or s-addrs)
  - * *paddr is the variable used to keep track of **paddr between calls
  - * port is the default port to assume
  - */
  -static void get_addresses(pool *p, char *w, server_addr_rec ***paddr, 
unsigned port)
  -{
  -

cvs commit: apachen/src CHANGES

1997-10-07 Thread Dean Gaudet
dgaudet 97/10/07 12:44:41

  Modified:htdocs/manual new_features_1_3.html upgrading_to_1_3.html
   src  CHANGES
  Log:
  Doc the vhost changes.
  
  Revision  ChangesPath
  1.26  +9 -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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- new_features_1_3.html 1997/10/04 18:43:28 1.25
  +++ new_features_1_3.html 1997/10/07 19:44:36 1.26
  @@ -310,6 +310,15 @@
   files.  So you will see errors in the config file.  This should make
   it easier to start Apache via rsh or crontab.
   
  +listrongImproved HTTP/1.1-style Virtual Hosts/strongbr
  +The new (undocumented) a href=mod/core.html#namevirtualhostcode
  +NameVirtualHost/code/a directive is used to list ip address:port
  +pairs on which HTTP/1.1-style virtual hosting occurs.  This is
  +vhosting based on the codeHost:/code header from the client.
  +Previously this address was implicitly the same as the main address
  +of the machine, and this caused no end of problems for users, and
  +was not powerful enough.
  +
   listrongAPI Additions/strongbr
   
   For all those module writers and code hackers:
  
  
  
  1.2   +12 -0 apachen/htdocs/manual/upgrading_to_1_3.html
  
  Index: upgrading_to_1_3.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/upgrading_to_1_3.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- upgrading_to_1_3.html 1997/10/06 03:06:36 1.1
  +++ upgrading_to_1_3.html 1997/10/07 19:44:37 1.2
  @@ -63,6 +63,18 @@
   h3Run-Time Configuration Changes/h3
   
   ul
  +  liFolks using HTTP/1.1-style virtual hosting will need to list the
  +ip:port pairs that are supposed to have HTTP/1.1-style virtual hosting
  +via the (undocumented) a href=mod/core.html#namevirtualhostcode
  +NameVirtualHost/code/a directive.  Previously this support was
  +given implicitly on the main server address.  Now it has to be
  +explicitly listed so as to avoid many problems that users had.
  +
  +  liThe precedence of virtual hosts has been reversed (applies mainly to
  +vhosts using HTTP/1.1 Host: headers, and the
  +a href=mod/core.html#serverpathServerPath/a directive).  Now
  +the earlier vhosts in the file have precedence over the later vhosts.
  +
 licodeHostnameLookups/code defaults to Off.
   
 liThe undocumented
  
  
  
  1.460 +8 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.459
  retrieving revision 1.460
  diff -u -r1.459 -r1.460
  --- CHANGES   1997/10/07 06:05:20 1.459
  +++ CHANGES   1997/10/07 19:44:39 1.460
  @@ -1,5 +1,13 @@
   Changes with Apache 1.3b1
   
  +  *) Yet another vhost revamp.  Add the NameVirtualHost directive which
  + explicitly lists the ip:port pairs that are to be used for name-vhosts.
  + From a given ip:port, regardless what the Host: header is, you can
  + only reach the vhosts defined on that ip:port.  The precedence of
  + vhosts was reversed to match other precedences in the config --
  + the earlier vhosts override the later vhosts.  All vhost matching was
  + moved into http_vhost.[ch].  [Dean Gaudet]
  +
 *) ap_inline can be used to force inlining.  GNUC __attribute__() can
be used for whatever reason is appropriate (i.e. format() warnings
for printf style functions).  Both are enabled only with
  
  
  


cvs commit: apachen/src/modules/example mod_example.c

1997-10-07 Thread Dean Gaudet
dgaudet 97/10/07 12:57:46

  Modified:src/modules/example mod_example.c
  Log:
  eliminate some -Wall warnings
  
  Revision  ChangesPath
  1.20  +2 -2  apachen/src/modules/example/mod_example.c
  
  Index: mod_example.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/example/mod_example.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- mod_example.c 1997/09/15 11:57:05 1.19
  +++ mod_example.c 1997/10/07 19:57:44 1.20
  @@ -253,6 +253,7 @@
   return (excfg *) get_module_config(r-per_dir_config, example_module);
   }
   
  +#if 0
   /*
* Locate our server configuration record for the specified server.
*/
  @@ -270,6 +271,7 @@
   
   return (excfg *) get_module_config(r-request_config, example_module);
   }
  +#endif
   
   /*
* This routine sets up some module-wide cells if they haven't been already.
  @@ -320,7 +322,6 @@
   char *where;
   pool *p;
   char *trace_copy;
  -excfg *rconfig;
   
   /*
* Make sure our pools and tables are set up - we need 'em.
  @@ -480,7 +481,6 @@
   {
   
   excfg *dcfg;
  -excfg *rcfg;
   
   dcfg = our_dconfig(r);
   trace_add(r-server, r, dcfg, example_handler());
  
  
  


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

1997-10-07 Thread Dean Gaudet
dgaudet 97/10/07 13:05:07

  Modified:src  CHANGES
   src/main httpd.h util.c util_script.c
   src/modules/standard mod_cgi.c
  Log:
  Back out PR#918, it doesn't seem to do what it was supposed to do -- could
  be my fault because I had to update it to the newer logging/formatting.
  But nobody has had a chance to fix it yet.
  
  Revision  ChangesPath
  1.462 +0 -3  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.461
  retrieving revision 1.462
  diff -u -r1.461 -r1.462
  --- CHANGES   1997/10/07 19:53:19 1.461
  +++ CHANGES   1997/10/07 20:04:58 1.462
  @@ -38,9 +38,6 @@
Also removed the auto-generated link to www.apache.org that was the
source of so many misdirected bug reports.  [Roy Fielding, Marc Slemko]
   
  -  *) Change to CGI permission test to allow User/Group tests to do the
  - right thing for suexec. [Randy Terbush] PR#918
  -
 *) send_fb would not detect aborted connections in some situations.
[Dean Gaudet]
   
  
  
  
  1.153 +1 -1  apachen/src/main/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/httpd.h,v
  retrieving revision 1.152
  retrieving revision 1.153
  diff -u -r1.152 -r1.153
  --- httpd.h   1997/10/07 19:34:05 1.152
  +++ httpd.h   1997/10/07 20:05:02 1.153
  @@ -811,7 +811,7 @@
   API_EXPORT(uid_t) uname2id(const char *name);
   API_EXPORT(gid_t) gname2id(const char *name);
   API_EXPORT(int) is_directory(const char *name);
  -API_EXPORT(int) can_exec(const struct stat *, uid_t, gid_t);
  +API_EXPORT(int) can_exec(const struct stat *);
   API_EXPORT(void) chdir_file(const char *file);
   
   #ifndef HAVE_CANONICAL_FILENAME
  
  
  
  1.71  +3 -3  apachen/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/util.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- util.c1997/09/26 03:52:11 1.70
  +++ util.c1997/10/07 20:05:03 1.71
  @@ -1070,7 +1070,7 @@
   return (x ? 1 : 0);  /* If the first character is ':', it's 
broken, too */
   }
   
  -API_EXPORT(int) can_exec(const struct stat *finfo, uid_t uid, gid_t gid)
  +API_EXPORT(int) can_exec(const struct stat *finfo)
   {
   #ifdef MULTIPLE_GROUPS
   int cnt;
  @@ -1079,10 +1079,10 @@
   /* OS/2 dosen't have Users and Groups */
   return 1;
   #else
  -if (uid == finfo-st_uid)
  +if (user_id == finfo-st_uid)
if (finfo-st_mode  S_IXUSR)
return 1;
  -if (gid == finfo-st_gid)
  +if (group_id == finfo-st_gid)
if (finfo-st_mode  S_IXGRP)
return 1;
   #ifdef MULTIPLE_GROUPS
  
  
  
  1.77  +0 -14 apachen/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/util_script.c,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- util_script.c 1997/10/07 05:27:11 1.76
  +++ util_script.c 1997/10/07 20:05:03 1.77
  @@ -817,13 +817,6 @@
grpname = gr-gr_name;
}
   
  - if (!can_exec(r-finfo, pw-pw_uid, gr-gr_gid)) {
  - aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  - file permissions deny server execution: %s,
  - r-filename);
  - return -1;
  - }
  -
if (shellcmd)
execle(SUEXEC_BIN, SUEXEC_BIN, execuser, grpname, argv0, NULL, env);
   
  @@ -838,13 +831,6 @@
}
   }
   else {
  - if (!can_exec(r-finfo, user_id, group_id)) {
  - aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  - file permissions deny server execution: %s,
  - r-filename);
  - return -1;
  - }
  -
if (shellcmd)
execle(SHELL_PATH, SHELL_PATH, -c, argv0, NULL, env);
   
  
  
  
  1.60  +5 -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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- mod_cgi.c 1997/10/07 05:27:24 1.59
  +++ mod_cgi.c 1997/10/07 20:05:06 1.60
  @@ -393,6 +393,11 @@
return log_scripterror(r, conf, NOT_FOUND, APLOG_NOERRNO,
   script not found or unable to stat);
   #endif
  +if (!suexec_enabled) {
  + if (!can_exec(r-finfo))
  + return log_scripterror(r, conf, FORBIDDEN, APLOG_NOERRNO,
  +file permissions deny server execution

cvs commit: apachen/conf .cvsignore

1997-10-07 Thread Dean Gaudet
dgaudet 97/10/07 13:08:33

  Added:   conf .cvsignore
  Log:
  more ignore goodness
  
  Revision  ChangesPath
  1.1  apachen/conf/.cvsignore
  
  Index: .cvsignore
  ===
  access.conf
  httpd.conf
  srm.conf
  
  
  


cvs commit: apachen/src/main conf.h

1997-10-05 Thread Dean Gaudet
dgaudet 97/10/05 19:56:26

  Modified:src/main conf.h
  Log:
  Allow admin to easily revert from SYSVSEM to FCNTL under IRIX.
  
  Revision  ChangesPath
  1.144 +2 -1  apachen/src/main/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.143
  retrieving revision 1.144
  diff -u -r1.143 -r1.144
  --- conf.h1997/10/02 05:25:00 1.143
  +++ conf.h1997/10/06 02:56:24 1.144
  @@ -138,8 +138,9 @@
* there's some weird conflict with non-BSD signals */
   #define NO_KILLPG
   #undef NO_SETSID
  -/*#define USE_FCNTL_SERIALIZED_ACCEPT */
  +#if !defined(USE_FCNTL_SERIALIZED_ACCEPT)  
!defined(USE_USLOCK_SERIALIZED_ACCEPT)
   #define USE_SYSVSEM_SERIALIZED_ACCEPT
  +#endif
   #define HAVE_SHMGET
   #define USE_MMAP_FILES
   #define HAVE_CRYPT_H
  
  
  


cvs commit: apachen/htdocs/manual upgrading_to_1_3.html index.html

1997-10-05 Thread Dean Gaudet
dgaudet 97/10/05 20:06:38

  Modified:htdocs/manual index.html
  Added:   htdocs/manual upgrading_to_1_3.html
  Log:
  Document changes from 1.2 to 1.3 that will affect existing installations.
  
  Revision  ChangesPath
  1.17  +1 -0  apachen/htdocs/manual/index.html
  
  Index: index.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/index.html,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- index.html1997/08/01 17:06:32 1.16
  +++ index.html1997/10/06 03:06:35 1.17
  @@ -20,6 +20,7 @@
   h3a name=newRelease Notes/a/h3
   ul
   lia href=new_features_1_3.htmlNew features in Apache 1.3/a
  +lia href=upgrading_to_1_3.htmlUpgrading to Apache 1.3/a
   lia href=new_features_1_2.htmlNew features in Apache 1.2/a
   lia href=new_features_1_1.htmlNew features in Apache 1.1/a
   lia href=new_features_1_0.htmlNew features in Apache 1.0/a
  
  
  
  1.1  apachen/htdocs/manual/upgrading_to_1_3.html
  
  Index: upgrading_to_1_3.html
  ===
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN
  htmlhead
  titleUpgrading to 1.3 from 1.2/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=CENTERUpgrading to 1.3 from 1.2/h1
  
  pIn order to assist folks upgrading we are now going to maintain a
  document describing information critical to existing Apache users.  Note
  that it only lists differences between recent major releases, so
  for example, folks using Apache 1.1 or earlier will have to figure out
  what changed up to Apache 1.2 before this document can be considered
  relevant.  Old users could look at the codesrc/CHANGES/code file
  which tracks code changes.
  
  pThese are intended to be brief notes, and you should be able to find
  more information in either the a href=new_features_1_3.htmlNew 
Features/a
  document, or in the codesrc/CHANGES/code file.
  
  h3Compile-Time Configuration Changes/h3
  
  ul
LIThe source code has been a href=sourcereorg.htmlreorganized/a,
  which affects anyone with custom modules or modifications.  But also,
  the codeModule/code directive has been changed to the
  codeAddModule/code directive.
  
LIThe codeConfiguration/code variable codeEXTRA_LFLAGS/code has
  been renamed codeEXTRA_LDFLAGS/code.

LIThe code-DMAXIMUM_DNS/code definition has been obsoleted by
  changes to codemod_access/code enforcing double-reverse DNS lookups
  all the time.

LIcodemod_dir/code has been split into two pieces
  codea href=mod/mod_autoindex.htmlmod_autoindex/a/code, and
  codea href=mod/mod_dir.htmlmod_dir/a/code.
  
LIa href=mod/mod_browser.htmlcodemod_browser/code/a has been
  replaced by a href=mod/mod_setenvif.htmlcodemod_setenvif/code/a.
  
LIIRIX systems with untrusted users who can write CGIs which execute
  as the same uid as httpd should consider using codesuexec/code,
  or adding code-DUSE_FCNTL_SERIALIZED_ACCEPT/code to
  codeEXTRA_CFLAGS/code.  This is slower, more information is available
  on the a href=misc/perf-tuning.html#serializeperformance tuning
  page/a.  There is a mild denial of service attack possible with the
  default config, but the default config is an order of magnitude faster.
  
licodemod_auth_msql/code has been removed from the distribution.
  
  /ul
  
  h3Run-Time Configuration Changes/h3
  
  ul
licodeHostnameLookups/code defaults to Off.
  
liThe undocumented
  a href=mod/mod_access.htmlcodemod_access/code/a
  syntax allow user-agents was removed.  The replacement is the
  more general allow from env.
  
liWhen using wildcards in pathnames (such as * and ?) they no longer
  match / (slash).  That is, they more closely behave how the shell
  behaves.  This affects codelt;Directorygt;/code directives,
  for example.
  
liIf no codeTransferLog/code directive is given then nothing will
  be logged.
  (Previously it would default to codelogs/access_log/code.)
  
liApache now has a href=mod/core.html#loglevelconfigurable error
  logging levels/a, and the default eliminates some messages that
  earlier versions always generated.
  
liWhen booting, Apache will now detach itself from stdin, stdout,
   and stderr.  stderr will not be detached until after the config
   files have been read so you will be able to see initial error
   messages.  After that all errors are logged in the error_log.
   This makes it more convenient to start Apache via rsh, ssh,
   or crontabs.
  
  /ul
  
  h3Misc Changes/h3
  
  ul
licodeServerType inetd/code has been deprecated.  It 

cvs commit: apachen/htdocs/manual new_features_1_2.html new_features_1_3.html windows.html

1997-10-04 Thread Dean Gaudet
dgaudet 97/10/04 11:43:31

  Modified:htdocs/manual new_features_1_2.html new_features_1_3.html
windows.html
  Log:
  update from Lars
  
  Revision  ChangesPath
  1.33  +0 -8  apachen/htdocs/manual/new_features_1_2.html
  
  Index: new_features_1_2.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/new_features_1_2.html,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- new_features_1_2.html 1997/07/06 17:18:56 1.32
  +++ new_features_1_2.html 1997/10/04 18:43:27 1.33
  @@ -163,14 +163,6 @@
   A new codelt;IfModulegt;/code section allows directives to be
   enabled only if a given module is loaded into the server.
   
  -liba href=ncsa_auth.htmlAuthorization Directives Now Use
  -NCSA-style Syntax/a/bbr
  -
  -The a href=mod/mod_auth.html#authuserfileAuthUserFile/a, a
  -href=mod/mod_auth.html#authgroupfileAuthGroupFile/a and a
  -href=mod/mod_digest.html#authdigestfileAuthDigestFile/a commands
  -now have a syntax compatible with the NCSA server.
  -
   liba href=mod/core.html#satisfyNCSA Satisfy authentication
   directive now implemented/a/bbr
   codeSatisfy/code allows for more flexible access control
  
  
  
  1.25  +3 -3  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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- new_features_1_3.html 1997/10/02 05:10:26 1.24
  +++ new_features_1_3.html 1997/10/04 18:43:28 1.25
  @@ -152,9 +152,9 @@
   href=mod/mod_alias.html#redirectmatchRedirectMatch/a/code
   directives allow for the use of regular expression matching.
   Additionally, new
  -codea 
href=mod_core.html#directorymatchlt;DirectoryMatchgt;/a/code,
  -codea href=mod_core.html#locationmatchlt;LocationMatchgt;/a/code,
  -and codea href=mod_core.html#filesmatchlt;FilesMatchgt;/a/code
  +codea 
href=mod/core.html#directorymatchlt;DirectoryMatchgt;/a/code,
  +codea href=mod/core.html#locationmatchlt;LocationMatchgt;/a/code,
  +and codea href=mod/core.html#filesmatchlt;FilesMatchgt;/a/code
   sections provide a new syntax for regular expression sectioning.
   
   listronga href=mod/mod_mime_magic.htmlNew Magic MIME-typing
  
  
  
  1.6   +1 -1  apachen/htdocs/manual/windows.html
  
  Index: windows.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/windows.html,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- windows.html  1997/08/23 04:47:24 1.5
  +++ windows.html  1997/10/04 18:43:28 1.6
  @@ -179,7 +179,7 @@
  this is set, it is recommended that a very high number is
  used. The recommended default, codeMaxRequestsPerChild
  0/code, does not cause the process to ever exit.
  -  pa href=mode/core.html#threadsperchildThreadsPerChild/a -
  +  pa href=mod/core.html#threadsperchildThreadsPerChild/a -
This directive is new, and tells the server how many threads it
should use. This is the maximum number of connections the server
can handle at once; be sure and set this number high enough for
  
  
  


cvs commit: apachen/src/main http_main.c

1997-10-04 Thread Dean Gaudet
dgaudet 97/10/04 19:02:39

  Modified:src/main http_main.c
  Log:
  Fix a bug with SAFE_UNSERIALIZED_ACCEPT.
  
  Revision  ChangesPath
  1.229 +1 -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.228
  retrieving revision 1.229
  diff -u -r1.228 -r1.229
  --- http_main.c   1997/10/02 05:25:03 1.228
  +++ http_main.c   1997/10/05 02:02:38 1.229
  @@ -3472,7 +3472,7 @@
/* Clear the pool - including any registered cleanups */
destroy_pool(pconf);
cleanup_scoreboard();
  - accept_mutex_cleanup();
  + SAFE_ACCEPT(accept_mutex_cleanup());
   
exit(0);
}
  
  
  


cvs commit: apachen/src/main http_request.c

1997-10-04 Thread Dean Gaudet
dgaudet 97/10/04 19:04:46

  Modified:src/main http_request.c
  Log:
  Fix wildcarding of special directories like proxy:
  
  Reviewed by:  Jim Jagielski
  
  Revision  ChangesPath
  1.86  +1 -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.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- http_request.c1997/09/14 12:16:55 1.85
  +++ http_request.c1997/10/05 02:04:44 1.86
  @@ -324,7 +324,7 @@
   this_conf = entry_config;
   }
   else if (entry_core-d_is_fnmatch) {
  -if (!fnmatch(entry_dir, test_filename, FNM_PATHNAME))
  +if (!fnmatch(entry_dir, test_filename, 0))
   this_conf = entry_config;
   }
   else if (!strncmp(test_filename, entry_dir, strlen(entry_dir)))
  
  
  


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

1997-10-04 Thread Dean Gaudet
dgaudet 97/10/04 19:06:39

  Modified:src/main alloc.c http_main.c
  Log:
  Fix Ouch!  Freeing free block error.  Beef up sigsegv/bus handler to also
  deal with sigabort/sigabrt and not get into an infinite loop.
  
  Reviewed by:  Rob Hartill
  
  Revision  ChangesPath
  1.49  +1 -0  apachen/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/alloc.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- alloc.c   1997/09/14 11:36:33 1.48
  +++ alloc.c   1997/10/05 02:06:36 1.49
  @@ -127,6 +127,7 @@
   while (free_blk) {
if (free_blk == blok) {
fprintf(stderr, Ouch!  Freeing free block\n);
  + abort();
exit(1);
}
free_blk = free_blk-h.next;
  
  
  
  1.230 +54 -18apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.229
  retrieving revision 1.230
  diff -u -r1.229 -r1.230
  --- http_main.c   1997/10/05 02:02:38 1.229
  +++ http_main.c   1997/10/05 02:06:37 1.230
  @@ -769,6 +769,7 @@
   --alarms_blocked;
   if (alarms_blocked == 0) {
if (exit_after_unblock) {
  + exit_after_unblock = 0;
child_exit_modules(pconf, server_conf);
destroy_pool(pconf);
exit(0);
  @@ -1911,26 +1912,46 @@
   }
   
   
  -void bus_error(int sig)
  +/* handle all varieties of core dumping signals */
  +void sig_coredump(int sig)
   {
   char emsg[256];
  +const char *s;
   
  -ap_snprintf(emsg, sizeof(emsg),
  - httpd: caught SIGBUS, attempting to dump core in %s,
  - coredump_dir);
  -aplog_error(APLOG_MARK, APLOG_INFO, server_conf, emsg);
  -chdir(coredump_dir);
  -abort();
  -exit(1);
  -}
  +/* Must protect against a nested signal, otherwise we could end up in
  + * an infinite loop.
  + */
  +signal(SIGSEGV, SIG_DFL);
  +#ifdef SIGBUS
  +signal(SIGBUS, SIG_DFL);
  +#endif
  +#ifdef SIGABORT
  +signal(SIGABORT, SIG_DFL);
  +#endif
  +#ifdef SIGABRT
  +signal(SIGABRT, SIG_DFL);
  +#endif
   
  -void seg_fault(int sig)
  -{
  -char emsg[256];
  +s = SIGSEGV;
  +#ifdef SIGBUS
  +if (sig == SIGBUS) {
  + s = SIGBUS;
  +}
  +#endif
  +#ifdef SIGABORT
  +if (sig == SIGABORT) {
  + s = SIGABORT;
  +}
  +#endif
  +#ifdef SIGABRT
  +if (sig == SIGABRT) {
  + s = SIGABRT;
  +}
  +#endif
   
   ap_snprintf(emsg, sizeof(emsg),
  - httpd: caught SIGSEGV, attempting to dump core in %s,
  - coredump_dir);
  + httpd: caught %s, attempting to dump core in %s,
  + s, coredump_dir);
   aplog_error(APLOG_MARK, APLOG_INFO, server_conf, emsg);
   chdir(coredump_dir);
   abort();
  @@ -1997,12 +2018,21 @@
   sa.sa_flags = 0;
   
   if (!one_process) {
  - sa.sa_handler = seg_fault;
  + sa.sa_handler = sig_coredump;
if (sigaction(SIGSEGV, sa, NULL)  0)
aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, 
sigaction(SIGSEGV));
  - sa.sa_handler = bus_error;
  +#ifdef SIGBUS
if (sigaction(SIGBUS, sa, NULL)  0)
aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, 
sigaction(SIGBUS));
  +#endif
  +#ifdef SIGABORT
  + if (sigaction(SIGABORT, sa, NULL)  0)
  + aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, 
sigaction(SIGABORT));
  +#endif
  +#ifdef SIGABRT
  + if (sigaction(SIGABRT, sa, NULL)  0)
  + aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, 
sigaction(SIGABRT));
  +#endif
   }
   sa.sa_handler = sig_term;
   if (sigaction(SIGTERM, sa, NULL)  0)
  @@ -2018,10 +2048,16 @@
aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, 
sigaction(SIGUSR1));
   #else
   if (!one_process) {
  - signal(SIGSEGV, seg_fault);
  + signal(SIGSEGV, sig_coredump);
   #ifdef SIGBUS
  - signal(SIGBUS, bus_error);
  + signal(SIGBUS, sig_coredump);
   #endif /* SIGBUS */
  +#ifdef SIGABORT
  + signal(SIGABORT, sig_coredump);
  +#endif /* SIGABORT */
  +#ifdef SIGABRT
  + signal(SIGABRT, sig_coredump);
  +#endif /* SIGABRT */
   }
   
   signal(SIGTERM, sig_term);
  
  
  


cvs commit: apachen/src CHANGES

1997-10-04 Thread Dean Gaudet
dgaudet 97/10/04 19:22:24

  Modified:src  CHANGES
  Log:
  CoreDumpDirectory not mentioned
  
  Revision  ChangesPath
  1.456 +4 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.455
  retrieving revision 1.456
  diff -u -r1.455 -r1.456
  --- CHANGES   1997/10/02 05:24:53 1.455
  +++ CHANGES   1997/10/05 02:22:22 1.456
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b1
   
  +  *) CoreDumpDirectory directive directs where the core file is
  + written when a SIGSEGV, SIGBUS, SIGABORT or SIGABRT are
  + received.  [Marc Slemko, Dean Gaudet]
  +
 *) PORT: Support for Atari MINT.
[Jan Paul Schmidt [EMAIL PROTECTED]]
   
  
  
  


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

1997-10-01 Thread Dean Gaudet
dgaudet 97/10/01 22:25:05

  Modified:src  CHANGES Configure
   src/helpers GuessOS
   src/main conf.h http_main.c
  Log:
  Atari MINT port.
  
  Submitted by: Jan Paul Schmidt [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet, Brian Behlendorf, Jim Jagielski
  
  Revision  ChangesPath
  1.455 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.454
  retrieving revision 1.455
  diff -u -r1.454 -r1.455
  --- CHANGES   1997/10/02 05:10:30 1.454
  +++ CHANGES   1997/10/02 05:24:53 1.455
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b1
   
  +  *) PORT: Support for Atari MINT.
  + [Jan Paul Schmidt [EMAIL PROTECTED]]
  +
 *) When booting, apache will now detach itself from stdin, stdout,
and stderr.  stderr will not be detached until after the config
files have been read so you will be able to see initial error
  
  
  
  1.158 +6 -0  apachen/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.157
  retrieving revision 1.158
  diff -u -r1.157 -r1.158
  --- Configure 1997/09/26 03:05:23 1.157
  +++ Configure 1997/10/02 05:24:55 1.158
  @@ -163,6 +163,12 @@
   OSDIR=os/unix
   
   case $PLAT in
  +*mint)
  +OS=MiNT
  +CFLAGS=-DMINT
  +LIBS=$LIBS -lportlib -lsocket
  +DEF_WANTHSREGEX=yes
  +;;
   *MPE/iX*)
   OS='MPE/iX'
CFLAGS=$CFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE
  
  
  
  1.31  +3 -0  apachen/src/helpers/GuessOS
  
  Index: GuessOS
  ===
  RCS file: /export/home/cvs/apachen/src/helpers/GuessOS,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- GuessOS   1997/09/16 03:59:59 1.30
  +++ GuessOS   1997/10/02 05:24:58 1.31
  @@ -56,6 +56,9 @@
   # Now we simply scan though... In most cases, the SYSTEM info is enough
   #
   case ${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE} in
  +MiNT:*)
  +echo m68k-atari-mint; exit 0
  + ;;
   A/UX:*)
echo m68k-apple-aux3; exit 0
;;
  
  
  
  1.143 +13 -1 apachen/src/main/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.142
  retrieving revision 1.143
  diff -u -r1.142 -r1.143
  --- conf.h1997/09/25 01:03:20 1.142
  +++ conf.h1997/10/02 05:25:00 1.143
  @@ -67,7 +67,19 @@
   #endif
   
   /* Define one of these according to your system. */
  -#if defined(MPE)
  +#if defined(MINT)
  +typedef int rlim_t;
  +#define HAVE_SYS_RESOURCE_H
  +#define JMP_BUF sigjmp_buf
  +#define NO_LONG_DOUBLE
  +#define USE_FLOCK_SERIALIZED_ACCEPT
  +#define _BSD_SOURCE
  +#define EAGAIN EACCESS
  +int initgroups (char *, int); 
  +char *crypt (const char *pw, const char *salt);
  +int gethostname (char *name, int namelen);
  +
  +#elif defined(MPE)
   #include sys/times.h
   #define NO_SETSID
   #define NO_KILLPG
  
  
  
  1.228 +5 -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.227
  retrieving revision 1.228
  diff -u -r1.227 -r1.228
  --- http_main.c   1997/10/02 05:10:33 1.227
  +++ http_main.c   1997/10/02 05:25:03 1.228
  @@ -117,6 +117,10 @@
   #endif
   
   
  +#ifdef MINT
  +long _stksize = 32768;
  +#endif
  +
   #ifdef __EMX__
   /* Add MMAP style functionality to OS/2 */
   #ifdef HAVE_MMAP
  @@ -3808,11 +3812,7 @@
int csd, int dupped_csd,
int requests_this_child, pool *pchild)
   {
  -#if defined(UW)
  -size_t clen;
  -#else
  -int clen;
  -#endif
  +NET_SIZE_T clen;
   struct sockaddr sa_server;
   struct sockaddr sa_client;
   
  
  
  


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

1997-09-30 Thread Dean Gaudet
  head
  titleApache Performance Notes/title
  /head
  body bgcolor=#ff text=#00 link=#ff vlink=#80 
alink=#ff
  
  h1Apache Performance Notes/h1
  
  pAuthor: Dean Gaudet
  
  h3Introduction/h3
  pApache is a general webserver, which is designed to be correct first, and
  fast second.  Even so, it's performance is quite satisfactory.  Most
  sites have less than 10Mbits of outgoing bandwidth, which Apache can
  fill using only a low end Pentium-based webserver.  In practice sites
  with more bandwidth require more than one machine to fill the bandwidth
  due to other constraints (such as CGI or database transaction overhead).
  For these reasons the development focus has been mostly on correctness
  and configurability.
  
  pUnfortunately many folks overlook these facts and cite raw performance
  numbers as if they are some indication of the quality of a web server
  product.  There is a bare minimum performance that is acceptable, beyond
  that extra speed only caters to a much smaller segment of the market.
  But in order to avoid this hurdle to the acceptance of Apache in some
  markets, effort was put into Apache 1.3 to bring performance up to a
  point where the difference with other high-end webservers is minimal.
  
  pFinally there are the folks who just plain want to see how fast something
  can go.  The author falls into this category.  The rest of this document
  is dedicated to these folks who want to squeeze every last bit of
  performance out of Apache's current model, and want to understand why
  it does some things which slow it down.
  
  pNote that this is tailored towards Apache 1.3 on Unix.  Some of it applies
  to Apache on NT.  Apache on NT has not been tuned for performance yet,
  in fact it probably performs very poorly because NT performance requires
  a different programming model.
  
  h3Hardware and Operating System Issues/h3
  
  pThe single biggest hardware issue affecting webserver performance
  is RAM.  A webserver should never ever have to swap, swapping increases
  the latency of each request beyond a point that users consider fast
  enough.  This causes users to hit stop and reload, further increasing
  the load.  You can, and should, control the codeMaxClients/code
  setting so that your server does not spawn so many children it starts
  swapping.
  
  pBeyond that the rest is mundane:  get a fast enough CPU, a fast enough
  network card, and fast enough disks, where fast enough is something
  that needs to be determined by experimentation.
  
  pOperating system choice is largely a matter of local concerns.  But
  a general guideline is to always apply the latest vendor TCP/IP patches.
  HTTP serving completely breaks many of the assumptions built into Unix
  kernels up through 1994 and even 1995.  Good choices include
  recent FreeBSD, and Linux.
  
  h3Run-Time Configuration Issues/h3
  
  h4HostnameLookups/h4
  pPrior to Apache 1.3, codeHostnameLookups/code defaulted to On.
  This adds latency
  to every request because it requires a DNS lookup to complete before
  the request is finished.  In Apache 1.3 this setting defaults to Off.
  However (1.3 or later), if you use any codeallow from domain/code or
  codedeny from domain/code directives then you will pay for a
  double reverse DNS lookup (a reverse, followed by a forward to make sure
  that the reverse is not being spoofed).  So for the highest performance
  avoid using these directives (it's fine to use IP addresses rather than
  domain names).
  
  pNote that it's possible to scope the directives, such as within
  a codelt;Location /server-statusgt;/code section.  In this
  case the DNS lookups are only performed on requests matching the
  criteria.  Here's an example which disables
  lookups except for .html and .cgi files:
  
  blockquotepre
  HostnameLookups off
  lt;Files ~ \.(html|cgi)$gt;
  HostnameLookups on
  lt;/Filesgt;
  /pre/blockquote
  
  But even still, if you just need DNS names
  in some CGIs you could consider doing the
  codegethostbyname/code call in the specific CGIs that need it.
  
  h4FollowSymLinks and SymLinksIfOwnerMatch/h4
  pWherever in your URL-space you do not have an
  codeOptions FollowSymLinks/code, or you do have an
  codeOptions SymLinksIfOwnerMatch/code Apache will have to
  issue extra system calls to check up on symlinks.  One extra call per
  filename component.  For example, if you had:
  
  blockquotepre
  DocumentRoot /www/htdocs
  lt;Directory /gt;
  Options SymLinksIfOwnerMatch
  lt;/Directorygt;
  /pre/blockquote
  
  and a request is made for the URI code/index.html/code.
  Then Apache will perform codelstat(2)/code on code/www/code,
  code/www/htdocs/code, and code/www/htdocs/index.html/code.  The
  results of these codelstats/code are never cached,
  so they will occur on every single request.  If you really desire the
  symlinks security checking you can do something like this:
  
  blockquotepre
  DocumentRoot /www/htdocs
  lt

cvs commit: apachen/src PORTING

1997-09-30 Thread Dean Gaudet
dgaudet 97/09/30 16:24:50

  Modified:src  PORTING
  Log:
  document new serialization stuff
  
  Revision  ChangesPath
  1.13  +24 -3 apachen/src/PORTING
  
  Index: PORTING
  ===
  RCS file: /export/home/cvs/apachen/src/PORTING,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- PORTING   1997/09/12 20:13:05 1.12
  +++ PORTING   1997/09/30 23:24:49 1.13
  @@ -205,17 +205,38 @@
   
USE_FCNTL_SERIALIZED_ACCEPT:
 Define if the OS requires a mutex lock around the socket accept()
  -  call. Use fcntl() locking.
  +  call. Use fcntl() locking.  See htdocs/manual/misc/perf-tuning.html.
   
USE_FLOCK_SERIALIZED_ACCEPT:
 Define if the OS requires a mutex lock around the socket accept()
 call. Use flock() locking (fcntl() is expensive on some OSs, esp.
  -  when using NFS).
  +  when using NFS).  See htdocs/manual/misc/perf-tuning.html.
  +
  + USE_USLOCK_SERIALIZED_ACCEPT:
  +  Probably IRIX only: use uslock() to serialize, which is far faster
  +  on multiprocessor boxes (and far slower on uniprocessor, yay).
  +  See htdocs/manual/misc/perf-tuning.html.
  +
  + USE_SYSVSEM_SERIALIZED_ACCEPT:
  +  Use System V semaphores to serialize accept.  These are problematic
  +  in that they won't be cleaned up if apache is kill -9d, and there's
  +  the potential of a CGI causing a denial of service attack if it's
  +  running as the same uid as apache (i.e. suexec is recommended on
  +  public servers).
  +  See htdocs/manual/misc/perf-tuning.html.
  + 
  + USE_PTHREADS_SERIALIZED_ACCEPT:
  +  Use POSIX mutexes to serialize accept.
  +  See htdocs/manual/misc/perf-tuning.html.
  +
  + SAFE_UNSERIALIZED_ACCEPT:
  +  It's safe to unserialize single-socket accept().
  +  See htdocs/manual/misc/perf-tuning.html.
   
USE_LONGJMP:
 Define to use the longjmp() call instead of siglongjmp()
 (as well as setjmp() instead of sigsetjmp()).
  - 
  +
USE_MMAP_FILES:
 Enable the use of mmap() for sending static files.
   
  
  
  


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

1997-09-25 Thread Dean Gaudet
dgaudet 97/09/25 19:56:43

  Modified:src  CHANGES
   src/modules/standard mod_alias.c
  Log:
  PR#1153: RedirectMatch does not escape its result.
  and unrelated to that PR:  RedirectMatch does not allow constructs
  such as RedirectMatch /advertiser/(.*) $1.
  
  Reviewed by:  Jim Jagielski, Roy Fielding
  
  Revision  ChangesPath
  1.445 +4 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.444
  retrieving revision 1.445
  diff -u -r1.444 -r1.445
  --- CHANGES   1997/09/19 17:32:02 1.444
  +++ CHANGES   1997/09/26 02:56:39 1.445
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b1
   
  +  *) RedirectMatch was not properly escaping the result (PR#1155).  Also
  + RedirectMatch /advertiser/(.*) $1 is now permitted.
  + [Dean Gaudet]
  +
 *) mod_include now uses symbolic names to check for request success
and return HTTP errors, and correctly handles all types of
redirections (previously it only did temporary redirect correctly).
  
  
  
  1.25  +6 -2  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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_alias.c   1997/09/16 05:31:56 1.24
  +++ mod_alias.c   1997/09/26 02:56:42 1.25
  @@ -188,7 +188,7 @@
   if (is_HTTP_REDIRECT(status)) {
if (!url)
return URL to redirect to is missing;
  - if (!is_url(url))
  + if (!use_regex  !is_url(url))
return Redirect to non-URL;
   }
   else {
  @@ -295,9 +295,13 @@
int l;
   
if (p-regexp) {
  - if (!regexec(p-regexp, r-uri, p-regexp-re_nsub + 1, regm, 0))
  + 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);
  + }
  + }
}
else {
l = alias_matches(r-uri, p-fake);
  
  
  


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

1997-09-25 Thread Dean Gaudet
dgaudet 97/09/25 19:59:11

  Modified:src  CHANGES
   src/modules/standard mod_autoindex.c
  Log:
  1)  Entity Names (like uuml;) are parsed and counted as having a width
  of one character. Until now, their length was taken in column
  counting, resulting in too early truncated description columns.
  
  2)  The last character of a description text which had the maximum
  allowed length (27?) was overwritten with the truncated character
  (''). This didn't make the string any shorter, but made it
  unreadable :-(   Now the string is truncated only if it really
  exceeds the maximum length.
  
  Submitted by: Martin Kraemer
  Reviewed by:  Dean Gaudet, Jim Jagielski, Roy Fielding
  
  Revision  ChangesPath
  1.446 +5 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.445
  retrieving revision 1.446
  diff -u -r1.445 -r1.446
  --- CHANGES   1997/09/26 02:56:39 1.445
  +++ CHANGES   1997/09/26 02:59:07 1.446
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3b1
   
  +  *) mod_autoindex improperly counted escapes; as more than one
  + character in the description.  It also improperly truncated
  + descriptions that were exactly the maximum length.
  + [Martin Kraemer]
  +
 *) RedirectMatch was not properly escaping the result (PR#1155).  Also
RedirectMatch /advertiser/(.*) $1 is now permitted.
[Dean Gaudet]
  
  
  
  1.49  +11 -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.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- mod_autoindex.c   1997/09/18 08:12:22 1.48
  +++ mod_autoindex.c   1997/09/26 02:59:10 1.49
  @@ -716,10 +716,20 @@
++x;
}
}
  + else if (desc[x] == '') {
  + /* entities like auml; count as one character */
  + --maxsize;
  + for ( ; desc[x] != ';'; ++x) {
  + if (desc[x] == '\0') {
  + maxsize = 0;
  + break;
  + }
  + }
  +}
else
--maxsize;
   }
  -if (!maxsize) {
  +if (!maxsize  desc[x] != '\0') {
desc[x - 1] = '';  /* Grump. */
desc[x] = '\0'; /* Double Grump! */
   }
  
  
  


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

1997-09-25 Thread Dean Gaudet
dgaudet 97/09/25 20:23:04

  Modified:src  CHANGES
   src/modules/standard mod_include.c
  Log:
  mod_include would use uninitialized data when parsing certain
  expressions involving  and ||
  
  PR:   1139
  Submitted by: Brian Slesinsky [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet, Jim Jagielski, Roy Fielding
  
  Revision  ChangesPath
  1.449 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.448
  retrieving revision 1.449
  diff -u -r1.448 -r1.449
  --- CHANGES   1997/09/26 03:19:28 1.448
  +++ CHANGES   1997/09/26 03:22:59 1.449
  @@ -1,4 +1,7 @@
   Changes with Apache 1.3b1
  +  
  +  *) mod_include would use uninitialized data when parsing certain
  + expressions involving  and ||. [Brian Slesinsky] PR#1139
   
 *) mod_imap should only handle GET methods.  [Jay Bloodworth]
   
  
  
  
  1.55  +2 -0  apachen/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_include.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- mod_include.c 1997/09/19 17:25:10 1.54
  +++ mod_include.c 1997/09/26 03:23:02 1.55
  @@ -1569,6 +1569,7 @@
   strncpy(current-left-token.value, buffer,
   MAX_STRING_LEN - 1);
   current-left-token.value[MAX_STRING_LEN - 1] = '\0';
  + current-left-value = (current-left-token.value[0] != 
'\0');
   current-left-done = 1;
   break;
   default:
  @@ -1584,6 +1585,7 @@
   strncpy(current-right-token.value, buffer,
   MAX_STRING_LEN - 1);
   current-right-token.value[MAX_STRING_LEN - 1] = '\0';
  + current-right-value = (current-right-token.value[0] != 
'\0');
   current-right-done = 1;
   break;
   default:
  
  
  


cvs commit: apachen/src/main http_protocol.c

1997-09-25 Thread Dean Gaudet
dgaudet 97/09/25 20:26:26

  Modified:src  CHANGES
   src/main http_protocol.c
  Log:
  send_fb would not detect aborted connections in some situations
  
  Reviewed by:  Jim Jagielski, Roy Fielding
  
  Revision  ChangesPath
  1.450 +4 -1  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.449
  retrieving revision 1.450
  diff -u -r1.449 -r1.450
  --- CHANGES   1997/09/26 03:22:59 1.449
  +++ CHANGES   1997/09/26 03:26:21 1.450
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b1
  -  
  +
  +  *) send_fb would not detect aborted connections in some situations.
  + [Dean Gaudet]
  +
 *) mod_include would use uninitialized data when parsing certain
expressions involving  and ||. [Brian Slesinsky] PR#1139
   
  
  
  
  1.163 +4 -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.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- http_protocol.c   1997/09/14 10:04:58 1.162
  +++ http_protocol.c   1997/09/26 03:26:24 1.163
  @@ -1805,6 +1805,7 @@
   
   soft_timeout(send body, r);
   
  +FD_ZERO(fds);
   while (!r-connection-aborted) {
   if ((length  0)  (total_bytes_sent + IOBUFSIZE)  length)
   len = length - total_bytes_sent;
  @@ -1813,13 +1814,14 @@
   
   do {
   n = bread(fb, buf, len);
  -if (n = 0)
  +if (n = 0 || r-connection-aborted)
   break;
   if (n  0  errno != EAGAIN)
   break;
   /* we need to block, so flush the output first */
   bflush(r-connection-client);
  -FD_ZERO(fds);
  +if (r-connection-aborted)
  +break;
   FD_SET(fd, fds);
   /*
* we don't care what select says, we might as well loop back
  
  
  


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

1997-09-25 Thread Dean Gaudet
dgaudet 97/09/25 20:52:15

  Modified:src  CHANGES
   src/main httpd.h util.c util_script.c
   src/modules/standard mod_cgi.c
  Log:
  Change to CGI permission test to allow User/Group tests to do the
  right thing for suexec. [Randy Terbush] PR#918
  
  (I had to rework this because the original was from pre-indent -djg)
  
  PR:   918
  Submitted by: Randy Terbush
  Reviewed by:  Dean Gaudet, Jim Jagielski
  
  Revision  ChangesPath
  1.451 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.450
  retrieving revision 1.451
  diff -u -r1.450 -r1.451
  --- CHANGES   1997/09/26 03:26:21 1.450
  +++ CHANGES   1997/09/26 03:52:08 1.451
  @@ -1,4 +1,7 @@
   Changes with Apache 1.3b1
  +  
  +  *) Change to CGI permission test to allow User/Group tests to do the
  + right thing for suexec. [Randy Terbush] PR#918
   
 *) send_fb would not detect aborted connections in some situations.
[Dean Gaudet]
  
  
  
  1.150 +1 -1  apachen/src/main/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/httpd.h,v
  retrieving revision 1.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- httpd.h   1997/09/16 00:25:46 1.149
  +++ httpd.h   1997/09/26 03:52:10 1.150
  @@ -834,7 +834,7 @@
   API_EXPORT(uid_t) uname2id(const char *name);
   API_EXPORT(gid_t) gname2id(const char *name);
   API_EXPORT(int) is_directory(const char *name);
  -API_EXPORT(int) can_exec(const struct stat *);
  +API_EXPORT(int) can_exec(const struct stat *, uid_t, gid_t);
   API_EXPORT(void) chdir_file(const char *file);
   
   #ifndef HAVE_CANONICAL_FILENAME
  
  
  
  1.70  +3 -3  apachen/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/util.c,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- util.c1997/09/14 22:18:57 1.69
  +++ util.c1997/09/26 03:52:11 1.70
  @@ -1070,7 +1070,7 @@
   return (x ? 1 : 0);  /* If the first character is ':', it's 
broken, too */
   }
   
  -API_EXPORT(int) can_exec(const struct stat *finfo)
  +API_EXPORT(int) can_exec(const struct stat *finfo, uid_t uid, gid_t gid)
   {
   #ifdef MULTIPLE_GROUPS
   int cnt;
  @@ -1079,10 +1079,10 @@
   /* OS/2 dosen't have Users and Groups */
   return 1;
   #else
  -if (user_id == finfo-st_uid)
  +if (uid == finfo-st_uid)
if (finfo-st_mode  S_IXUSR)
return 1;
  -if (group_id == finfo-st_gid)
  +if (gid == finfo-st_gid)
if (finfo-st_mode  S_IXGRP)
return 1;
   #ifdef MULTIPLE_GROUPS
  
  
  
  1.75  +14 -0 apachen/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/util_script.c,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- util_script.c 1997/09/16 03:49:57 1.74
  +++ util_script.c 1997/09/26 03:52:12 1.75
  @@ -827,6 +827,13 @@
grpname = gr-gr_name;
}
   
  + if (!can_exec(r-finfo, pw-pw_uid, gr-gr_gid)) {
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + file permissions deny server execution: %s,
  + r-filename);
  + return -1;
  + }
  +
if (shellcmd)
execle(SUEXEC_BIN, SUEXEC_BIN, execuser, grpname, argv0, NULL, env);
   
  @@ -841,6 +848,13 @@
}
   }
   else {
  + if (!can_exec(r-finfo, user_id, group_id)) {
  + aplog_error(APLOG_MARK, APLOG_ERR, r-server,
  + file permissions deny server execution: %s,
  + r-filename);
  + return -1;
  + }
  +
if (shellcmd)
execle(SHELL_PATH, SHELL_PATH, -c, argv0, NULL, env);
   
  
  
  
  1.57  +0 -5  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.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mod_cgi.c 1997/09/18 08:12:23 1.56
  +++ mod_cgi.c 1997/09/26 03:52:14 1.57
  @@ -400,11 +400,6 @@
return log_scripterror(r, conf, NOT_FOUND,
   script not found or unable to stat);
   #endif
  -if (!suexec_enabled) {
  - if (!can_exec(r-finfo))
  - return log_scripterror(r, conf, FORBIDDEN,
  -file permissions deny server execution);
  -}
   
   if ((retval = setup_client_block(r, REQUEST_CHUNKED_ERROR

cvs commit: apache/src CHANGES http_main.c

1997-09-22 Thread Dean Gaudet
dgaudet 97/09/22 14:58:56

  Modified:src  Tag: APACHE_1_2_X CHANGES http_main.c
  Log:
  inetd mode uses timeouts without setting up the jmpbuf
  
  PR:   1064
  Reviewed by:  Marc Slemko, Roy Fielding
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.286.2.54 +3 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.286.2.53
  retrieving revision 1.286.2.54
  diff -u -r1.286.2.53 -r1.286.2.54
  --- CHANGES   1997/09/22 21:55:23 1.286.2.53
  +++ CHANGES   1997/09/22 21:58:49 1.286.2.54
  @@ -1,5 +1,8 @@
   Changes with Apache 1.2.5
   
  +  *) Inetd mode (which is buggy) uses timeouts without having setup the
  + jmpbuffer. [Dean Gaudet] PR#1064
  +
 *) Work around problem under Linux where a child will start looping
reporting a select error over and over.
[Rick Franchuk [EMAIL PROTECTED]] PR#1107
  
  
  
  1.149.2.10 +3 -0  apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.149.2.9
  retrieving revision 1.149.2.10
  diff -u -r1.149.2.9 -r1.149.2.10
  --- http_main.c   1997/09/22 21:55:25 1.149.2.9
  +++ http_main.c   1997/09/22 21:58:51 1.149.2.10
  @@ -2471,6 +2471,9 @@
 GETUSERMODE();
 }
   #endif
  +if (ap_setjmp (jmpbuffer)) {
  + exit (0);
  +}
   
c = sizeof(sa_client);
if ((getpeername(fileno(stdin), sa_client, c))  0)
  
  
  


cvs commit: apachen/src INDENT

1997-09-18 Thread Dean Gaudet
dgaudet 97/09/18 00:49:52

  Modified:src  INDENT
  Log:
  more procrastination
  
  Revision  ChangesPath
  1.27  +4 -4  apachen/src/INDENT
  
  Index: INDENT
  ===
  RCS file: /export/home/cvs/apachen/src/INDENT,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- INDENT1997/09/16 05:31:54 1.26
  +++ INDENT1997/09/18 07:49:51 1.27
  @@ -61,10 +61,10 @@
  mod_actions.c DONE by Dean
  mod_alias.c   DONE by Dean
  mod_asis.cDONE by Dean
  -   mod_auth.c
  -   mod_auth_anon.c
  -   mod_auth_db.c
  -   mod_auth_dbm.c
  +   mod_auth.cRESERVED by Dean
  +   mod_auth_anon.c   RESERVED by Dean
  +   mod_auth_db.c RESERVED by Dean
  +   mod_auth_dbm.cRESERVED by Dean
  mod_autoindex.c
  mod_cern_meta.c
  mod_cgi.c
  
  
  


cvs commit: apachen/src/modules/proxy proxy_cache.c proxy_ftp.c proxy_http.c proxy_util.c

1997-09-17 Thread Dean Gaudet
dgaudet 97/09/17 17:20:25

  Modified:src/modules/proxy proxy_cache.c proxy_ftp.c proxy_http.c
proxy_util.c
  Log:
  mod_proxy uses char *p and pool *pool a whole bunch ... which is not
  exactly the style we use elsewhere in the code.  Clean this up.
  
  I'm not sure, but proxy_cache.c had some interesting -Wshadow warnings
  involving a global time_t now and local time_t nows... I changed the
  name of the global to garbage_now.
  
  Other similar fixes.  This is just syntactic sugar similar to the indent
  changes.  I avoided fixing obvious segfault bugs I saw while doing this.
  
  The entire server should now pass gcc -Wshadow, which makes me a bit
  happier.
  
  Revision  ChangesPath
  1.28  +13 -13apachen/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- proxy_cache.c 1997/09/16 00:59:39 1.27
  +++ proxy_cache.c 1997/09/18 00:20:18 1.28
  @@ -90,7 +90,7 @@
   
   static int curbytes, cachesize, every;
   static unsigned long int curblocks;
  -static time_t now, expire;
  +static time_t garbage_now, garbage_expire;
   static char *filename;
   static mutex *garbage_mutex = NULL;
   
  @@ -148,8 +148,8 @@
   
   if (cachedir == NULL || every == -1)
return;
  -now = time(NULL);
  -if (now != -1  lastcheck != BAD_DATE  now  lastcheck + every)
  +garbage_now = time(NULL);
  +if (garbage_now != -1  lastcheck != BAD_DATE  garbage_now  
lastcheck + every)
return;
   
   block_alarms();  /* avoid SIGALRM on big cache cleanup */
  @@ -167,7 +167,7 @@
if (errno != EEXIST)
proxy_log_uerror(creat, filename, NULL, r-server);
else
  - lastcheck = abs(now);   /* someone else got in there */
  + lastcheck = abs(garbage_now);   /* someone else got in there */
unblock_alarms();
return;
}
  @@ -175,7 +175,7 @@
   }
   else {
lastcheck = buf.st_mtime;   /* save the time */
  - if (now  lastcheck + every) {
  + if (garbage_now  lastcheck + every) {
unblock_alarms();
return;
}
  @@ -199,7 +199,7 @@
   for (i = 0; i  files-nelts; i++) {
fent = elts[i];
sprintf(filename, %s%s, cachedir, fent-file);
  - Explain3(GC Unlinking %s (expiry %ld, now %ld), filename, 
fent-expire, now);
  + Explain3(GC Unlinking %s (expiry %ld, garbage_now %ld), filename, 
fent-garbage_expire, garbage_now);
   #if TESTING
fprintf(stderr, Would unlink %s\n, filename);
   #else
  @@ -259,8 +259,8 @@
if (errno != ENOENT)
proxy_log_uerror(stat, filename, NULL, r-server);
}
  - else if (now != -1  buf.st_atime  now - SEC_ONE_DAY 
  -  buf.st_mtime  now - SEC_ONE_DAY) {
  + else if (garbage_now != -1  buf.st_atime  garbage_now - 
SEC_ONE_DAY 
  +  buf.st_mtime  garbage_now - SEC_ONE_DAY) {
Explain1(GC unlink %s, filename);
   #if TESTING
fprintf(stderr, Would unlink %s\n, filename);
  @@ -314,12 +314,12 @@
}
close(fd);
line[i] = '\0';
  - expire = proxy_hex2sec(line + 18);
  + garbage_expire = proxy_hex2sec(line + 18);
if (!checkmask(line,   ) ||
  - expire == BAD_DATE) {
  + garbage_expire == BAD_DATE) {
/* bad file */
  - if (now != -1  buf.st_atime  now + SEC_ONE_DAY 
  - buf.st_mtime  now + SEC_ONE_DAY) {
  + if (garbage_now != -1  buf.st_atime  garbage_now + SEC_ONE_DAY 
  + buf.st_mtime  garbage_now + SEC_ONE_DAY) {
log_error(proxy: deleting bad cache file, r-server);
   #if TESTING
fprintf(stderr, Would unlink bad file %s\n, filename);
  @@ -340,7 +340,7 @@
 */
fent = palloc(r-pool, sizeof(struct gc_ent));
fent-len = buf.st_size;
  - fent-expire = expire;
  + fent-expire = garbage_expire;
strcpy(fent-file, cachesubdir);
strcat(fent-file, ent-d_name);
*(struct gc_ent **) push_array(files) = fent;
  
  
  
  1.39  +58 -59apachen/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- proxy_ftp.c   1997/09/16 00:59:40 1.38
  +++ proxy_ftp.c   1997/09/18 00:20:19 1.39
  @@ -105,13 +105,13 @@
*/
   int proxy_ftp_canon(request_rec *r, char *url)
   {
  -char *user, *password, *host, *path, *parms, *p, sport[7];
  -pool *pool = r-pool;
  +char *user, 

cvs commit: apachen/src/main http_config.c http_config.h

1997-09-15 Thread Dean Gaudet
dgaudet 97/09/15 17:18:06

  Modified:src  INDENT
   src/main http_config.c http_config.h
  Log:
  indent
  
  Revision  ChangesPath
  1.18  +6 -8  apachen/src/INDENT
  
  Index: INDENT
  ===
  RCS file: /export/home/cvs/apachen/src/INDENT,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- INDENT1997/09/15 23:58:10 1.17
  +++ INDENT1997/09/16 00:17:55 1.18
  @@ -8,16 +8,16 @@
  alloc.h   DONE by Dean
  buff.cDONE by Dean
  buff.hDONE by Dean
  -   conf.h
  +   conf.hRESERVED by Dean
  dummy.c
  explain.c
  explain.h
  fnmatch.c
  fnmatch.h
  http_bprintf.c
  -   http_conf_globals.h
  -   http_config.c RESERVED by Dean
  -   http_config.h RESERVED by Dean
  +   http_conf_globals.h   RESERVED by Dean
  +   http_config.c DONE by Dean
  +   http_config.h DONE by Dean
  http_core.c   RESERVED by Randy
  http_core.h   RESERVED by Randy
  http_log.cRESERVED by Randy
  @@ -28,15 +28,13 @@
  http_protocol.h   DONE by Roy
  http_request.cDONE by Roy
  http_request.hDONE by Roy
  -   httpd.h
  +   httpd.h   RESERVED by Dean
  md5.h
  md5c.c
  multithread.h
  -   os-inline.c
  -   os.h
  rfc1413.c
  rfc1413.h
  -   scoreboard.h
  +   scoreboard.h  RESERVED by Dean
  util.cDONE by Randy
  util_date.c   DONE by Randy
  util_date.h   DONE by Randy
  
  
  
  1.80  +540 -503  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.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- http_config.c 1997/09/12 22:55:15 1.79
  +++ http_config.c 1997/09/16 00:17:59 1.80
  @@ -93,10 +93,10 @@
*/
   static int dynamic_modules = 0;
   module *top_module = NULL;
  -
  -typedef int (*handler_func)(request_rec *);
  -typedef void *(*dir_maker_func)(pool *, char *);
  -typedef void *(*merger_func)(pool *, void *, void *);
  +
  +typedef int (*handler_func) (request_rec *);
  +typedef void *(*dir_maker_func) (pool *, char *);
  +typedef void *(*merger_func) (pool *, void *, void *);
   
   /* Dealing with config vectors.  These are associated with per-directory,
* per-server, and per-request configuration, and have a void* pointer for
  @@ -109,86 +109,87 @@
* overridden).
*/
   
  -API_EXPORT(void *) get_module_config (void *conf_vector, module *m)
  +API_EXPORT(void *) get_module_config(void *conf_vector, module *m)
   {
  -   void **confv = (void**)conf_vector;
  -   return confv[m-module_index];
  +void **confv = (void **) conf_vector;
  +return confv[m-module_index];
   }
   
  -API_EXPORT(void) set_module_config (void *conf_vector, module *m, void *val)
  +API_EXPORT(void) set_module_config(void *conf_vector, module *m, void *val)
   {
  -   void **confv = (void**)conf_vector;
  -   confv[m-module_index] = val;
  +void **confv = (void **) conf_vector;
  +confv[m-module_index] = val;
   }
   
   void *
  -create_empty_config (pool *p)
  + create_empty_config(pool *p)
   {
  -   void **conf_vector = (void **)pcalloc(p, sizeof(void*) *
  -  (total_modules+DYNAMIC_MODULE_LIMIT));
  -   return (void *)conf_vector;
  +void **conf_vector = (void **) pcalloc(p, sizeof(void *) *
  + (total_modules + DYNAMIC_MODULE_LIMIT));
  +return (void *) conf_vector;
   }
   
   void *
  -create_default_per_dir_config (pool *p)
  + create_default_per_dir_config(pool *p)
   {
  -   void **conf_vector = (void **)pcalloc(p, sizeof(void*) * 
(total_modules+DYNAMIC_MODULE_LIMIT));
  -   module *modp;
  +void **conf_vector = (void **) pcalloc(p, sizeof(void *) * 
(total_modules + DYNAMIC_MODULE_LIMIT));
  +module *modp;
   
  -   for (modp = top_module; modp; modp = modp-next) {
  -   dir_maker_func df = modp-create_dir_config;
  +for (modp = top_module; modp; modp = modp-next) {
  + dir_maker_func df = modp-create_dir_config;
   
  -   if (df) conf_vector[modp-module_index] = (*df)(p, NULL);
  -   }
  + if (df)
  + conf_vector[modp-module_index] = (*df) (p, NULL);
  +}
   
  -   return (void*)conf_vector;
  +return (void *) conf_vector;
   }
   
   void *
  -merge_per_dir_configs (pool *p, void *base, void *new)
  + merge_per_dir_configs(pool *p, void *base, void *new)
   {
  -   void **conf_vector = (void **)palloc(p, sizeof(void*) * 

cvs commit: apachen/src/modules/proxy .indent.pro mod_proxy.c mod_proxy.h proxy_cache.c proxy_connect.c proxy_ftp.c proxy_http.c proxy_util.c

1997-09-15 Thread Dean Gaudet
dgaudet 97/09/15 17:59:48

  Modified:src/modules/proxy mod_proxy.c mod_proxy.h proxy_cache.c
proxy_connect.c proxy_ftp.c proxy_http.c
proxy_util.c
  Added:   src/modules/proxy .indent.pro
  Log:
  painful indent
  
  Revision  ChangesPath
  1.25  +274 -271  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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_proxy.c   1997/09/05 00:26:32 1.24
  +++ mod_proxy.c   1997/09/16 00:59:38 1.25
  @@ -55,16 +55,17 @@
   
   /* Some WWW schemes and their default ports; this is basically /etc/services 
*/
   /* This will become global when the protocol abstraction comes */
  -static struct proxy_services defports[]={
  -{ ftp,  DEFAULT_FTP_PORT},
  -{ gopher,   DEFAULT_GOPHER_PORT},
  -{ http, DEFAULT_PORT},
  -{ nntp, DEFAULT_NNTP_PORT},
  -{ wais, DEFAULT_WAIS_PORT}, 
  -{ https,DEFAULT_HTTPS_PORT},
  -{ snews,DEFAULT_SNEWS_PORT},
  -{ prospero, DEFAULT_PROSPERO_PORT},
  -{ NULL, -1}  /* unknown port */
  +static struct proxy_services defports[] =
  +{
  +{ftp, DEFAULT_FTP_PORT},
  +{gopher, DEFAULT_GOPHER_PORT},
  +{http, DEFAULT_PORT},
  +{nntp, DEFAULT_NNTP_PORT},
  +{wais, DEFAULT_WAIS_PORT},
  +{https, DEFAULT_HTTPS_PORT},
  +{snews, DEFAULT_SNEWS_PORT},
  +{prospero, DEFAULT_PROSPERO_PORT},
  +{NULL, -1}   /* unknown port */
   };
   
   /*
  @@ -80,27 +81,28 @@
   /* -- */
   /* Translate the URL into a 'filename' */
   
  -static int
  -alias_match(char *uri, char *alias_fakename)
  +static int alias_match(char *uri, char *alias_fakename)
   {
  -char *end_fakename = alias_fakename + strlen (alias_fakename);
  +char *end_fakename = alias_fakename + strlen(alias_fakename);
   char *aliasp = alias_fakename, *urip = uri;
   
  -while (aliasp  end_fakename)
  -{
  - if (*aliasp == '/')
  - {
  +while (aliasp  end_fakename) {
  + if (*aliasp == '/') {
/* any number of '/' in the alias matches any number in
 * the supplied URI, but there must be at least one...
 */
  - if (*urip != '/') return 0;
  - 
  - while (*aliasp == '/') ++ aliasp;
  - while (*urip == '/') ++ urip;
  + if (*urip != '/')
  + return 0;
  +
  + while (*aliasp == '/')
  + ++aliasp;
  + while (*urip == '/')
  + ++urip;
}
else {
/* Other characters are compared literally */
  - if (*urip++ != *aliasp++) return 0;
  + if (*urip++ != *aliasp++)
  + return 0;
}
   }
   
  @@ -117,31 +119,28 @@
   return urip - uri;
   }
   
  -static int
  -proxy_trans(request_rec *r)
  +static int proxy_trans(request_rec *r)
   {
   void *sconf = r-server-module_config;
   proxy_server_conf *conf =
  -(proxy_server_conf *)get_module_config(sconf, proxy_module);
  +(proxy_server_conf *) get_module_config(sconf, proxy_module);
  +
  +if (r-proxyreq) {
  + if (!conf-req)
  + return DECLINED;
   
  -if (r-proxyreq)
  -{
  - if (!conf-req) return DECLINED;
  - 
r-filename = pstrcat(r-pool, proxy:, r-uri, NULL);
r-handler = proxy-server;
return OK;
  -} else
  -{
  +}
  +else {
int i, len;
  - struct proxy_alias *ent=(struct proxy_alias *)conf-aliases-elts;
  + struct proxy_alias *ent = (struct proxy_alias *) conf-aliases-elts;
   
  - for (i=0; i  conf-aliases-nelts; i++)
  - {
  + for (i = 0; i  conf-aliases-nelts; i++) {
len = alias_match(r-uri, ent[i].fake);
   
  - if (len  0)
  - {
  + if (len  0) {
r-filename = pstrcat(r-pool, proxy:, ent[i].real,
  r-uri + len, NULL);
r-handler = proxy-server;
  @@ -158,33 +157,35 @@
   /*
* Canonicalise the URL
*/
  -static int
  -proxy_fixup(request_rec *r)
  +static int proxy_fixup(request_rec *r)
   {
   char *url, *p;
   int i;
   
  -if (strncmp(r-filename, proxy:, 6) != 0) return DECLINED;
  +if (strncmp(r-filename, proxy:, 6) != 0)
  + return DECLINED;
   
   url = r-filename[6];
   /* lowercase the scheme */
   p = strchr(url, ':');
  -if (p == NULL || p == url) return BAD_REQUEST;
  -for (i=0; i != p - url; i++) url[i] = tolower(url[i]);
  +if (p == NULL || p == url)
  + return BAD_REQUEST;
  +for (i = 0; i != p - url; i++)
  + url[i] = tolower(url[i]);
   
   /* canonicalise each specific scheme */
   if 

cvs commit: apachen/src/main conf.h

1997-09-15 Thread Dean Gaudet
dgaudet 97/09/15 20:44:30

  Modified:src/main conf.h
  Log:
  When you NEED_ a function, you should declare the prototype for it as
  well.  (old patch from Martin)
  
  Submitted by: Martin Kraemer
  Reviewed by:  Dean Gaudet
  
  Revision  ChangesPath
  1.140 +26 -0 apachen/src/main/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.139
  retrieving revision 1.140
  diff -u -r1.139 -r1.140
  --- conf.h1997/09/16 00:25:45 1.139
  +++ conf.h1997/09/16 03:44:29 1.140
  @@ -948,3 +948,29 @@
   long vfprintf(FILE *, char *, va_list);
   
   #endif /* SUNOS_LIB_PROTOTYPES */
  +
  +/* The assumption is that when the functions are missing,
  + * then there's no matching prototype available either.
  + * Declare what is needed exactly as the replacement routines implement it.
  + */
  +#ifdef NEED_STRDUP
  +extern char *strdup (const char *str);
  +#endif
  +#ifdef NEED_STRCASECMP
  +extern int strcasecmp (const char *a, const char *b);
  +#endif
  +#ifdef NEED_STRNCASECMP
  +extern int strncasecmp (const char *a, const char *b, int n);
  +#endif
  +#ifdef NEED_INITGROUPS
  +extern int initgroups(const char *name, gid_t basegid);
  +#endif
  +#ifdef NEED_WAITPID
  +extern int waitpid(pid_t pid, int *statusp, int options);
  +#endif
  +#ifdef NEED_STRERROR
  +extern char *strerror (int err);
  +#endif
  +#ifdef NEED_DIFFTIME
  +extern double difftime(time_t time1, time_t time0);
  +#endif
  
  
  


cvs commit: apachen Makefile

1997-09-15 Thread Dean Gaudet
dgaudet 97/09/15 21:04:20

  Modified:.Makefile
  Log:
   On one of teh machines here, it appears as if the shell which is invoked
   in apachen/Makefile's line...
   src/httpd:
   (cd src; \
 test ! -f Configuration  cp Configuration.tmpl Configuration; \
 ./Configure -file Configuration; $(MAKE) all support)
   has an implicit -e switch set. I've never read about such a behavior,
   or why this would be caused, but tracing by setting set -x in the (..)
   reveals that the test in test ...  cp ... is the last executed
   statement, then the (...) returns with an exitcode of nonzero.
  
   I don't know if this happens anywhere else, too, but the defensive
   improvement to avoid such a trap could be the addition of a ||true.
  
  Submitted by: Martin Kraemer
  Reviewed by:  Dean Gaudet
  
  Revision  ChangesPath
  1.2   +1 -1  apachen/Makefile
  
  Index: Makefile
  ===
  RCS file: /export/home/cvs/apachen/Makefile,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile  1997/08/19 23:00:20 1.1
  +++ Makefile  1997/09/16 04:04:19 1.2
  @@ -12,7 +12,7 @@
   
   src/httpd:
(cd src; \
  -   test ! -f Configuration  cp Configuration.tmpl Configuration; \
  +   test ! -f Configuration  cp Configuration.tmpl Configuration || 
true; \
  ./Configure -file Configuration; $(MAKE) all support)
   
   lint: 
  
  
  


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

1997-09-15 Thread Dean Gaudet
dgaudet 97/09/15 21:06:05

  Modified:htdocs/manual/mod mod_auth_anon.html
  Log:
  |From [EMAIL PROTECTED] Mon Sep 15 21:04:46 1997
  |Date: Fri, 5 Sep 1997 14:22:32 +0200 (MET DST)
  |From: Martin Kraemer [EMAIL PROTECTED]
  |Reply-To: new-httpd@apache.org
  |To: Apache Mailing List new-httpd@apache.org
  |Subject: [DOC] mod_auth_anon.html corrections
  |
  |The mod_auth_anon.html documentation describes the default of
  |the Anonymous_LogEmail and Anonymous_MustGiveEmail being off, but in
  |the code, the default seems to be on.
  |
  |The Example section could be improved because when used as-is, the
  |server returns a [500] server error (configuration error:  couldn't check
  |user.  No user file?). I added a comment to clarify things.
  
  Submitted by: Martin Kraemer
  Reviewed by:  Dean Gaudet
  
  Revision  ChangesPath
  1.14  +13 -9 apachen/htdocs/manual/mod/mod_auth_anon.html
  
  Index: mod_auth_anon.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/mod/mod_auth_anon.html,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_auth_anon.html1997/08/26 02:07:20 1.13
  +++ mod_auth_anon.html1997/09/16 04:06:03 1.14
  @@ -101,7 +101,7 @@
   
   h2A name=LogEmailAnonymous_LogEmail directive/A/h2
   strongSyntax:/strong Anonymous_LogEmail emon | off/embr
  -strongDefault:/strong codeAnonymous_LogEmail off/codebr
  +strongDefault:/strong codeAnonymous_LogEmail on/codebr
   strongContext:/strong directory, .htaccessbr
   strongOverride:/strong AuthConfigbr
   strongStatus:/strong Extensionbr
  @@ -114,7 +114,7 @@
   h2A name=MustGiveEmailAnonymous_MustGiveEmail directive/A/h2
   !--%plaintext lt;?INDEX {\tt Anonymous_MustGiveEmail} directivegt; --
   strongSyntax:/strong Anonymous_MustGiveEmail emon/em | 
emoff/embr
  -strongDefault:/strong codeAnonymous_MustGiveEmail off/codebr
  +strongDefault:/strong codeAnonymous_MustGiveEmail on/codebr
   strongContext:/strong directory, .htaccessbr
   strongOverride:/strong AuthConfigbr
   strongStatus:/strong Extensionbr
  @@ -170,29 +170,33 @@
   li
   The userID must be one of codeanonymous guest www test welcome/code
   and comparison is bnot/b case sensitive.
  -codelt;directory /web/docs/publicgt;/code
   li
  -And the Email addresses entered in the passswd field are logged to
  +And the Email addresses entered in the passwd field are logged to
   the httpd-log file
   (codeAnonymous_LogEmail/code)
   /ul
   p
   Excerpt of access.conf:
   blockquotecode
  -Anonymousanonymous guest www test welcomep
  +Anonymous_NoUserId  offbr
   Anonymous_MustGiveEmail onbr
   Anonymous_VerifyEmailonbr
  -Anonymous_NoUserId  offbr
   Anonymous_LogEmail  onbr
  +Anonymousanonymous guest www test welcomep
   p
   AuthNameUse 'anonymous'  Email address for guest entrybr
  -AuthTypebasicp
  -
  -/code
  +AuthTypebasic
  +p
  +# An AuthUserFile/AuthDBUserFile/AuthDBMUserFilebr
  +# directive must be specified, or usebr
  +# Anonymous_Authoritative for public access.br
  +# In the .htaccess for the public directory, add:br
  +lt;Files *gt;br
   order deny,allow  br
   allow from allbr
   p
   require valid-userbr
  +lt;/Filesgt;br
   /code/blockquote
   
   
  
  
  


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

1997-09-15 Thread Dean Gaudet
dgaudet 97/09/15 21:13:07

  Modified:src  CHANGES
   src/modules/standard mod_userdir.c
  Log:
*) mod_userdir was modifying r-finfo in cases where it wasn't setting
   r-filename.  Since those two are meant to be in sync with each other
   this is a bug.  [Paul B. Henson [EMAIL PROTECTED]]
  
  Submitted by: Paul B. Henson [EMAIL PROTECTED]
  Reviewed by:  Dean Gaudet
  
  Revision  ChangesPath
  1.443 +5 -1  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.442
  retrieving revision 1.443
  diff -u -r1.442 -r1.443
  --- CHANGES   1997/09/16 03:59:56 1.442
  +++ CHANGES   1997/09/16 04:13:03 1.443
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b1
  -  
  +
  +  *) mod_userdir was modifying r-finfo in cases where it wasn't setting
  + r-filename.  Since those two are meant to be in sync with each other
  + this is a bug.  [Paul B. Henson [EMAIL PROTECTED]]
  +
 *) PORT: Support Unisys SVR4, whose uname returns mostly useless data.
[Kaufman, Steven E [EMAIL PROTECTED]]
   
  
  
  
  1.22  +3 -1  apachen/src/modules/standard/mod_userdir.c
  
  Index: mod_userdir.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_userdir.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- mod_userdir.c 1997/08/18 13:12:18 1.21
  +++ mod_userdir.c 1997/09/16 04:13:06 1.22
  @@ -194,6 +194,7 @@
   const char *userdirs = pstrdup (r-pool, s_cfg-userdir);
   const char *w, *dname, *redirect;
   char *x = NULL;
  +struct stat statbuf;
   
   /*
* If the URI doesn't match our basic pattern, we've nothing to do with
  @@ -312,8 +313,9 @@
  in the hope that some handler might handle it. This can be used, for
  example, to run a CGI script for the user. 
  */
  -  if (filename  (!*userdirs || stat(filename, r-finfo) != -1)) {
  +  if (filename  (!*userdirs || stat(filename, statbuf) != -1)) {
   r-filename = pstrcat(r-pool, filename, dname, NULL);
  + r-finfo = statbuf;
   return OK;
 }
   }
  
  
  


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

1997-09-15 Thread Dean Gaudet
dgaudet 97/09/15 21:40:36

  Modified:src/modules/standard mod_speling.c
  Log:
  use popendir/pclosedir to avoid resource losing race condition
  
  Revision  ChangesPath
  1.3   +3 -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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_speling.c 1997/09/16 04:30:22 1.2
  +++ mod_speling.c 1997/09/16 04:40:34 1.3
  @@ -228,7 +228,7 @@
   url = pstrndup(r-pool, r-uri, (urlen - pglen));
   
   /* Now open the directory and do ourselves a check... */
  -dirp = opendir(good);
  +dirp = popendir(r-pool, good);
   if (dirp == NULL)   /* Oops, not a directory... */
   return DECLINED;
   
  @@ -247,7 +247,7 @@
* Do _not_ try to redirect this, it causes a loop!
*/
   if (strcmp(bad, dir_entry-d_name) == 0) {
  -closedir(dirp);
  +pclosedir(r-pool, dirp);
   return OK;
   }
   /*
  @@ -310,7 +310,7 @@
   #endif
   }
   }
  -closedir(dirp);
  +pclosedir(r-pool, dirp);
   
   if (candidates-nelts != 0) {
   /* Wow... we found us a mispelling. Construct a fixed url */
  
  
  


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

1997-09-15 Thread Dean Gaudet
dgaudet 97/09/15 21:49:51

  Modified:src/modules/standard mod_unique_id.c
  Log:
  Fix the accuracy of some comments.  Raise the logging level of a bad error
  to CRIT.  This is a case where I need the filename logged ... but with
  the new format I either include it myself and have it logged twice for
  some people, or don't include it and have it not logged for other people.
  Lose lose.
  
  Revision  ChangesPath
  1.4   +8 -8  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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_unique_id.c   1997/09/16 04:30:22 1.3
  +++ mod_unique_id.c   1997/09/16 04:49:50 1.4
  @@ -51,7 +51,7 @@
*/
   
   /*
  - * mod_uniqueid.c: generate a unique identifier for each request
  + * mod_unique_id.c: generate a unique identifier for each request
*
* Original author: Dean Gaudet [EMAIL PROTECTED]
*/
  @@ -215,21 +215,21 @@
* it's guaranteed that none of them will share the same pids between
* children.
* 
  - * XXX: for multithread this needs to use a pid/tid combo and probably 
XXX:
  + * XXX: for multithread this needs to use a pid/tid combo and probably
* needs to be expanded to 32 bits
*/
   pid = getpid();
   cur_unique_id.pid = pid;
   
   /*
  - * Test our assumption that the pid is 16-bits.  But note we can't just
  - * test sizeof (pid_t) because on some machines pid_t is 32-bits but pids
  - * are actually only 16-bits.  It would have been really nice to test
  - * this during global_init ... but oh well.
  + * Test our assumption that the pid is 32-bits.  It's possible that
  + * 64-bit machines will declare pid_t to be 64 bits but only use 32
  + * of them.  It would have been really nice to test this during
  + * global_init ... but oh well.
*/
   if (cur_unique_id.pid != pid) {
  -aplog_error(APLOG_MARK, APLOG_DEBUG, s,
  -oh no! pids are greater than 16-bits!  I'm broken!);
  +aplog_error(APLOG_MARK, APLOG_CRIT, s,
  +oh no! pids are greater than 32-bits!  I'm broken!);
   }
   
   cur_unique_id.in_addr = global_in_addr;
  
  
  


cvs commit: apachen/src/main http_main.c

1997-09-14 Thread Dean Gaudet
dgaudet 97/09/14 03:30:57

  Modified:src  CHANGES
   src/main http_main.c
  Log:
*) Inetd mode (which is buggy) uses timeouts without having setup the
   jmpbuffer. [Dean Gaudet] PR#1064
  
*) Work around problem under Linux where a child will start looping
   reporting a select error over and over.
   [Rick Franchuk [EMAIL PROTECTED]] PR#1107
  
  PR:   1064, 1107
  Reviewed by:  Dean Gaudet, Roy Fielding, Marc Slemko
  
  Revision  ChangesPath
  1.441 +8 -1  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.440
  retrieving revision 1.441
  diff -u -r1.440 -r1.441
  --- CHANGES   1997/09/14 07:34:35 1.440
  +++ CHANGES   1997/09/14 10:30:53 1.441
  @@ -1,5 +1,12 @@
   Changes with Apache 1.3b1
  -  
  +
  +  *) Inetd mode (which is buggy) uses timeouts without having setup the
  + jmpbuffer. [Dean Gaudet] PR#1064
  +
  +  *) Work around problem under Linux where a child will start looping
  + reporting a select error over and over.
  + [Rick Franchuk [EMAIL PROTECTED]] PR#1107
  +
 *) Fixed error in proxy_util.c when looping through multiple host IP
addresses. [Lars Eilebrecht] PR#974
   
  
  
  
  1.223 +14 -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.222
  retrieving revision 1.223
  diff -u -r1.222 -r1.223
  --- http_main.c   1997/09/13 23:10:50 1.222
  +++ http_main.c   1997/09/14 10:30:56 1.223
  @@ -2851,8 +2851,18 @@
memcpy(main_fds, listenfds, sizeof(fd_set));
srv = ap_select(listenmaxfd+1, main_fds, NULL, NULL, NULL);
   
  - if (srv  0  errno != EINTR)
  + if (srv  0  errno != EINTR) {
  +#ifdef LINUX
  + if (errno == EFAULT) {
  + aplog_error(APLOG_MARK, APLOG_ERR, server_conf,
  + select: (listen) fatal, exiting);
  + child_exit_modules (pconf, server_conf);
  + destroy_pool(pconf);
  + exit(1);
  + }
  +#endif
aplog_error(APLOG_MARK, APLOG_ERR, server_conf, select: 
(listen));
  + }

if (srv = 0)
continue;
  @@ -3579,6 +3589,9 @@
 GETUSERMODE();
 }
   #endif
  + if (ap_setjmp (jmpbuffer)) {
  + exit (0);
  + }
   
l = sizeof(sa_client);
if ((getpeername(fileno(stdin), sa_client, l))  0)
  
  
  


cvs commit: apachen/src/main http_main.c

1997-09-14 Thread Dean Gaudet
dgaudet 97/09/14 04:06:53

  Modified:src  INDENT
   src/main http_main.c
  Log:
  indent
  
  Revision  ChangesPath
  1.5   +2 -2  apachen/src/INDENT
  
  Index: INDENT
  ===
  RCS file: /export/home/cvs/apachen/src/INDENT,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- INDENT1997/09/14 10:35:01 1.4
  +++ INDENT1997/09/14 11:06:49 1.5
  @@ -21,8 +21,8 @@
  http_core.h
  http_log.c
  http_log.h
  -   http_main.c   RESERVED by Dean
  -   http_main.h
  +   http_main.c   DONE by Dean
  +   http_main.h   RESERVED by Dean
  http_protocol.c   DONE by Roy
  http_protocol.h   DONE by Roy
  http_request.cRESERVED while Roy is working on it
  
  
  
  1.224 +1269 -1256apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.223
  retrieving revision 1.224
  diff -u -r1.223 -r1.224
  --- http_main.c   1997/09/14 10:30:56 1.223
  +++ http_main.c   1997/09/14 11:06:51 1.224
  @@ -61,9 +61,9 @@
*   of processes
*
* 03-10-95  blong
  - *   Added numerous speed hacks proposed by Robert S. Thau ([EMAIL 
PROTECTED]) 
  - *   including set group before fork, and call gettime before to fork
  - *   to set up libraries.
  + *  Added numerous speed hacks proposed by Robert S. Thau ([EMAIL 
PROTECTED]) 
  + *  including set group before fork, and call gettime before to fork
  + *  to set up libraries.
*
* 04-14-95  rst / rh
*  Brandon's code snarfed from NCSA 1.4, but tinkered to work with the
  @@ -82,7 +82,7 @@
   #include http_protocol.h   /* for read_request */
   #include http_request.h/* for process_request */
   #include http_conf_globals.h
  -#include http_core.h  /* for get_remote_host */
  +#include http_core.h   /* for get_remote_host */
   #include scoreboard.h
   #include multithread.h
   #include sys/stat.h
  @@ -119,14 +119,14 @@
   
   #ifdef __EMX__
   /* Add MMAP style functionality to OS/2 */
  -#ifdef HAVE_MMAP
  -#define INCL_DOSMEMMGR
  -#include os2.h
  -#include umalloc.h
  -#include stdio.h
  -caddr_t create_shared_heap (const char *, size_t);
  -caddr_t get_shared_heap (const char *);
  -#endif
  +#ifdef HAVE_MMAP
  +#define INCL_DOSMEMMGR
  +#include os2.h
  +#include umalloc.h
  +#include stdio.h
  +caddr_t create_shared_heap(const char *, size_t);
  +caddr_t get_shared_heap(const char *);
  +#endif
   #endif
   
   DEF_Explain
  @@ -240,7 +240,7 @@
   struct other_child_rec {
   other_child_rec *next;
   int pid;
  -void (*maintenance)(int, void *, int);
  +void (*maintenance) (int, void *, int);
   void *data;
   int write_fd;
   };
  @@ -261,7 +261,7 @@
   
   #ifdef WIN32
   #define ap_killpg(x, y)
  -#else 
  +#else
   #ifdef NO_KILLPG
   #define ap_killpg(x, y)  (kill (-(x), (y)))
   #else
  @@ -274,8 +274,8 @@
   {
   char buf[20];
   
  -ap_snprintf( buf, sizeof(buf), .%u, getpid() );
  -lock_fname = pstrcat (p, server_root_relative (p, lock_fname), buf, 
NULL);
  +ap_snprintf(buf, sizeof(buf), .%u, getpid());
  +lock_fname = pstrcat(p, server_root_relative(p, lock_fname), buf, NULL);
   }
   #endif
   
  @@ -294,50 +294,50 @@
   
   
   /* default is 8, allocate enough for all the children plus the parent */
  -if ((old = usconfig(CONF_INITUSERS, HARD_SERVER_LIMIT+1)) == -1) {
  -perror(usconfig(CONF_INITUSERS));
  -exit(-1);
  +if ((old = usconfig(CONF_INITUSERS, HARD_SERVER_LIMIT + 1)) == -1) {
  + perror(usconfig(CONF_INITUSERS));
  + exit(-1);
   }
   
   if ((old = usconfig(CONF_LOCKTYPE, US_NODEBUG)) == -1) {
  -perror(usconfig(CONF_LOCKTYPE));
  -exit(-1);
  + perror(usconfig(CONF_LOCKTYPE));
  + exit(-1);
   }
   if ((old = usconfig(CONF_ARENATYPE, US_SHAREDONLY)) == -1) {
  -perror(usconfig(CONF_ARENATYPE));
  -exit(-1);
  + perror(usconfig(CONF_ARENATYPE));
  + exit(-1);
   }
   if ((us = usinit(/dev/zero)) == NULL) {
  -perror(usinit);
  -exit(-1);
  + perror(usinit);
  + exit(-1);
   }
   
   if ((uslock = usnewlock(us)) == NULL) {
  -perror(usnewlock);
  -exit(-1);
  + perror(usnewlock);
  + exit(-1);
   }
   }
   
   static void accept_mutex_on()
   {
  -switch(ussetlock(uslock)) {
  -case 1:
  -/* got lock */
  -break;
  -case 0:
  -fprintf(stderr, didn't get lock\n);
  -exit(-1);
  -case -1:
  -perror(ussetlock);
  - 

cvs commit: apachen/src/main http_main.h

1997-09-14 Thread Dean Gaudet
dgaudet 97/09/14 04:09:34

  Modified:src  INDENT
   src/main http_main.h
  Log:
  indent
  
  Revision  ChangesPath
  1.6   +3 -3  apachen/src/INDENT
  
  Index: INDENT
  ===
  RCS file: /export/home/cvs/apachen/src/INDENT,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- INDENT1997/09/14 11:06:49 1.5
  +++ INDENT1997/09/14 11:09:32 1.6
  @@ -5,8 +5,8 @@
   ./main:  STATUS
  alloc.c
  alloc.h
  -   buff.c
  -   buff.h
  +   buff.cRESERVED by Dean
  +   buff.hRESERVED by Dean
  conf.h
  dummy.c
  explain.c
  @@ -22,7 +22,7 @@
  http_log.c
  http_log.h
  http_main.c   DONE by Dean
  -   http_main.h   RESERVED by Dean
  +   http_main.h   DONE by Dean
  http_protocol.c   DONE by Roy
  http_protocol.h   DONE by Roy
  http_request.cRESERVED while Roy is working on it
  
  
  
  1.19  +15 -15apachen/src/main/http_main.h
  
  Index: http_main.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.h,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- http_main.h   1997/09/12 20:13:19 1.18
  +++ http_main.h   1997/09/14 11:09:33 1.19
  @@ -85,17 +85,17 @@
* reset_timeout() resets the timeout in progress.
*/
   
  -API_EXPORT(void) hard_timeout (char *, request_rec *);
  -void keepalive_timeout (char *, request_rec *);
  -API_EXPORT(void) soft_timeout (char *, request_rec *);
  -API_EXPORT(void) kill_timeout (request_rec *); 
  -API_EXPORT(void) reset_timeout (request_rec *);
  +API_EXPORT(void) hard_timeout(char *, request_rec *);
  +void keepalive_timeout(char *, request_rec *);
  +API_EXPORT(void) soft_timeout(char *, request_rec *);
  +API_EXPORT(void) kill_timeout(request_rec *);
  +API_EXPORT(void) reset_timeout(request_rec *);
   
  -API_EXPORT(void) child_terminate (request_rec *r);
  -API_EXPORT(void) sync_scoreboard_image (void);
  -int update_child_status (int child_num, int status, request_rec *r);
  -void time_process_request (int child_num, int status);
  -unsigned int set_callback_and_alarm(void (*fn)(int), int x);
  +API_EXPORT(void) child_terminate(request_rec *r);
  +API_EXPORT(void) sync_scoreboard_image(void);
  +int update_child_status(int child_num, int status, request_rec *r);
  +void time_process_request(int child_num, int status);
  +unsigned int set_callback_and_alarm(void (*fn) (int), int x);
   int check_alarm(void);
   
   #ifndef NO_OTHER_CHILD
  @@ -113,11 +113,11 @@
* This is useful for log pipe children, to know when they've blocked.  To
* disable this feature, use -1 for write_fd.
*/
  -API_EXPORT(void) register_other_child (int pid,
  -void (*maintenance)(int reason, void *data, int status), void *data,
  -int write_fd);
  +API_EXPORT(void) register_other_child(int pid,
  +   void (*maintenance) (int reason, void *data, int status), void *data,
  +   int write_fd);
   #define OC_REASON_DEATH  0   /* child has died, caller must 
call
  - * unregister still */
  +  * unregister still */
   #define OC_REASON_UNWRITABLE 1   /* write_fd is unwritable */
   #define OC_REASON_RESTART2   /* a restart is occuring, perform
 * any necessary cleanup (including
  @@ -134,6 +134,6 @@
* is assumed to be unique per other_child.  This is because the pid and
* write_fd are possibly killed off separately.
*/
  -API_EXPORT(void) unregister_other_child (void *data);
  +API_EXPORT(void) unregister_other_child(void *data);
   
   #endif
  
  
  


cvs commit: apachen/src/main buff.c buff.h

1997-09-14 Thread Dean Gaudet
dgaudet 97/09/14 04:13:54

  Modified:src  INDENT
   src/main buff.c buff.h
  Log:
  indent
  
  Revision  ChangesPath
  1.7   +4 -4  apachen/src/INDENT
  
  Index: INDENT
  ===
  RCS file: /export/home/cvs/apachen/src/INDENT,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- INDENT1997/09/14 11:09:32 1.6
  +++ INDENT1997/09/14 11:13:51 1.7
  @@ -3,10 +3,10 @@
   If a file has already been indent'd, or doesn't need it, mark it as DONE
   
   ./main:  STATUS
  -   alloc.c
  -   alloc.h
  -   buff.cRESERVED by Dean
  -   buff.hRESERVED by Dean
  +   alloc.c   RESERVED by Dean
  +   alloc.h   RESERVED by Dean
  +   buff.cDONE by Dean
  +   buff.hDONE by Dean
  conf.h
  dummy.c
  explain.c
  
  
  
  1.45  +318 -300  apachen/src/main/buff.c
  
  Index: buff.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/buff.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- buff.c1997/08/17 11:40:11 1.44
  +++ buff.c1997/09/14 11:13:52 1.45
  @@ -97,8 +97,7 @@
   
   #ifdef WIN32
   
  -int
  -sendwithtimeout(int sock, const char *buf, int len, int flags)
  +int sendwithtimeout(int sock, const char *buf, int len, int flags)
   {
   int iostate = 1;
   fd_set fdset;
  @@ -106,47 +105,42 @@
   int err = WSAEWOULDBLOCK;
   int rv;
   
  -if(!(tv.tv_sec = check_alarm()))
  -return(send(sock, buf, len, flags));
  -
  +if (!(tv.tv_sec = check_alarm()))
  + return (send(sock, buf, len, flags));
  +
   rv = ioctlsocket(sock, FIONBIO, iostate);
   iostate = 0;
  -if(rv)
  -{
  -err = WSAGetLastError();
  -ap_assert(0);
  +if (rv) {
  + err = WSAGetLastError();
  + ap_assert(0);
   }
   rv = send(sock, buf, len, flags);
  -if(rv == SOCKET_ERROR)
  -{
  -err = WSAGetLastError();
  -if(err == WSAEWOULDBLOCK)
  -{
  -FD_ZERO(fdset);
  -FD_SET(sock, fdset);
  -tv.tv_usec = 0;
  -rv = select(FD_SETSIZE, NULL, fdset, NULL, tv);
  -if(rv == 0)
  -{
  -ioctlsocket(sock, FIONBIO, iostate);
  -check_alarm();
  -WSASetLastError(WSAEWOULDBLOCK);
  -return(SOCKET_ERROR);
  -}
  -rv = send(sock, buf, len, flags);
  -if(rv == SOCKET_ERROR)
  -err = WSAGetLastError();
  -}
  +if (rv == SOCKET_ERROR) {
  + err = WSAGetLastError();
  + if (err == WSAEWOULDBLOCK) {
  + FD_ZERO(fdset);
  + FD_SET(sock, fdset);
  + tv.tv_usec = 0;
  + rv = select(FD_SETSIZE, NULL, fdset, NULL, tv);
  + if (rv == 0) {
  + ioctlsocket(sock, FIONBIO, iostate);
  + check_alarm();
  + WSASetLastError(WSAEWOULDBLOCK);
  + return (SOCKET_ERROR);
  + }
  + rv = send(sock, buf, len, flags);
  + if (rv == SOCKET_ERROR)
  + err = WSAGetLastError();
  + }
   }
   ioctlsocket(sock, FIONBIO, iostate);
  -if(rv == SOCKET_ERROR)
  -WSASetLastError(err);
  -return(rv);
  +if (rv == SOCKET_ERROR)
  + WSASetLastError(err);
  +return (rv);
   }
   
   
  -int
  -recvwithtimeout(int sock, char *buf, int len, int flags)
  +int recvwithtimeout(int sock, char *buf, int len, int flags)
   {
   int iostate = 1;
   fd_set fdset;
  @@ -154,74 +148,71 @@
   int err = WSAEWOULDBLOCK;
   int rv;
   
  -if(!(tv.tv_sec = check_alarm()))
  -return(recv(sock, buf, len, flags));
  -
  +if (!(tv.tv_sec = check_alarm()))
  + return (recv(sock, buf, len, flags));
  +
   rv = ioctlsocket(sock, FIONBIO, iostate);
   iostate = 0;
   ap_assert(!rv);
   rv = recv(sock, buf, len, flags);
  -if(rv == SOCKET_ERROR)
  -{
  -err = WSAGetLastError();
  -if(err == WSAEWOULDBLOCK)
  -{
  -FD_ZERO(fdset);
  -FD_SET(sock, fdset);
  -tv.tv_usec = 0;
  -rv = select(FD_SETSIZE, fdset, NULL, NULL, tv);
  -if(rv == 0)
  -{
  -ioctlsocket(sock, FIONBIO, iostate);
  -check_alarm();
  -WSASetLastError(WSAEWOULDBLOCK);
  -return(SOCKET_ERROR);
  -}
  -rv = recv(sock, buf, len, flags);
  -if(rv == SOCKET_ERROR)
  -err = WSAGetLastError();
  -}
  +if (rv == SOCKET_ERROR) {
  + err = WSAGetLastError();
  + if (err == WSAEWOULDBLOCK) {
  +

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

1997-09-14 Thread Dean Gaudet
dgaudet 97/09/14 04:36:34

  Modified:src  INDENT
   src/main alloc.c alloc.h
  Log:
  indent
  
  Revision  ChangesPath
  1.8   +2 -2  apachen/src/INDENT
  
  Index: INDENT
  ===
  RCS file: /export/home/cvs/apachen/src/INDENT,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- INDENT1997/09/14 11:13:51 1.7
  +++ INDENT1997/09/14 11:36:32 1.8
  @@ -3,8 +3,8 @@
   If a file has already been indent'd, or doesn't need it, mark it as DONE
   
   ./main:  STATUS
  -   alloc.c   RESERVED by Dean
  -   alloc.h   RESERVED by Dean
  +   alloc.c   DONE by Dean
  +   alloc.h   DONE by Dean
  buff.cDONE by Dean
  buff.hDONE by Dean
  conf.h
  
  
  
  1.48  +854 -808  apachen/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/alloc.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- alloc.c   1997/08/20 01:22:50 1.47
  +++ alloc.c   1997/09/14 11:36:33 1.48
  @@ -68,32 +68,30 @@
* Managing free storage blocks...
*/
   
  -union align
  -{
  -  /* Types which are likely to have the longest RELEVANT alignment
  -   * restrictions...
  -   */
  -  
  -  char *cp;
  -  void (*f)(void);
  -  long l;
  -  FILE *fp;
  -  double d;
  +union align {
  +/* Types which are likely to have the longest RELEVANT alignment
  + * restrictions...
  + */
  +
  +char *cp;
  +void (*f) (void);
  +long l;
  +FILE *fp;
  +double d;
   };
   
   #define CLICK_SZ (sizeof(union align))
   
  -union block_hdr
  -{
  -  union align a;
  -  
  -  /* Actual header... */
  -  
  -  struct {
  -char *endp;
  -union block_hdr *next;
  -char *first_avail;
  -  } h;
  +union block_hdr {
  +union align a;
  +
  +/* Actual header... */
  +
  +struct {
  + char *endp;
  + union block_hdr *next;
  + char *first_avail;
  +} h;
   };
   
   union block_hdr *block_freelist = NULL;
  @@ -102,75 +100,76 @@
   
   
   /* Get a completely new block from the system pool. Note that we rely on
  -malloc() to provide aligned memory. */
  +   malloc() to provide aligned memory. */
   
  -union block_hdr *malloc_block (int size)
  +union block_hdr *malloc_block(int size)
   {
  -  union block_hdr *blok =
  -(union block_hdr *)malloc(size + sizeof(union block_hdr));
  +union block_hdr *blok =
  +(union block_hdr *) malloc(size + sizeof(union block_hdr));
  +
  +if (blok == NULL) {
  + fprintf(stderr, Ouch!  malloc failed in malloc_block()\n);
  + exit(1);
  +}
  +blok-h.next = NULL;
  +blok-h.first_avail = (char *) (blok + 1);
  +blok-h.endp = size + blok-h.first_avail;
   
  -  if (blok == NULL) {
  -  fprintf (stderr, Ouch!  malloc failed in malloc_block()\n);
  -  exit (1);
  -  }
  -  blok-h.next = NULL;
  -  blok-h.first_avail = (char *)(blok + 1);
  -  blok-h.endp = size + blok-h.first_avail;
  -  
  -  return blok;
  +return blok;
   }
   
   
   
  -void chk_on_blk_list (union block_hdr *blok, union block_hdr *free_blk)
  +void chk_on_blk_list(union block_hdr *blok, union block_hdr *free_blk)
   {
  -  /* Debugging code.  Left in for the moment. */
  -
  -  while (free_blk) {
  -if (free_blk == blok) {
  -  fprintf (stderr, Ouch!  Freeing free block\n);
  -  exit (1);
  +/* Debugging code.  Left in for the moment. */
  +
  +while (free_blk) {
  + if (free_blk == blok) {
  + fprintf(stderr, Ouch!  Freeing free block\n);
  + exit(1);
  + }
  + free_blk = free_blk-h.next;
   }
  -free_blk = free_blk-h.next;
  -  }
   }
   
   /* Free a chain of blocks --- must be called with alarms blocked. */
   
  -void free_blocks (union block_hdr *blok)
  +void free_blocks(union block_hdr *blok)
   {
  -  /* 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.
  -   */
  -  
  -  union block_hdr *old_free_list;
  -
  -  if (blok == NULL) return;  /* Sanity check --- freeing empty pool? */
  -  
  -  (void)acquire_mutex(alloc_mutex);
  -  old_free_list = block_freelist;
  -  block_freelist = blok;
  -  
  -  /*
  -   * Next, adjust first_avail pointers of each block --- have to do it
  -   * sooner or later, and it simplifies the search in new_block to do it
  -   * now.
  -   */
  -
  -  while (blok-h.next != NULL) {
  -chk_on_blk_list (blok, old_free_list);
  -blok-h.first_avail = (char *)(blok + 1);
  -blok = blok-h.next;
  -  }
  +/* First, put new blocks at the head of the free list ---
  + * we'll 

cvs commit: apachen/src/os/win32 os.h

1997-09-12 Thread Dean Gaudet
dgaudet 97/09/12 13:13:26

  Modified:htdocs/manual new_features_1_3.html
   src  CHANGES PORTING
   src/main conf.h http_log.c http_log.h http_main.c
http_main.h
   src/modules/standard mod_log_config.c
   src/os/win32 os.h
  Log:
*) API: New register_other_child() API (see http_main.h) which allows
   modules to register children with the parent for maintenance.  It
   is disabled by defining NO_OTHER_CHILD.  [Dean Gaudet]
  
*) API: New piped_log API (see http_log.h) which implements piped logs,
   and will use register_other_child to implement reliable piped logs
   when it is available.  The reliable piped logs part can be disabled
   by defining NO_RELIABLE_PIPED_LOGS.  At the moment reliable piped
   logs is only available on Unix. [Dean Gaudet]
  
  Revision  ChangesPath
  1.21  +11 -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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- new_features_1_3.html 1997/08/28 15:24:05 1.20
  +++ new_features_1_3.html 1997/09/12 20:13:01 1.21
  @@ -258,6 +258,17 @@
   identifier is available in the environment variable
   codeUNIQUE_ID/code.
   
  +listrongReliable Piped Logs/strongbr
  +On almost all Unix architectures Apache now implements reliable
  +piped logs in a href=mod/mod_log_config.htmlmod_log_config/a.
  +Where reliable means that if the logging child dies for whatever
  +reason, Apache will recover and respawn it without having to restart
  +the entire server.  Furthermore if the logging child becomes stuck
  +and isn't reading its pipe frequently enough Apache will also restart
  +it.  This opens up more opportunities for log rotation, hit filtering,
  +real-time splitting of multiple vhosts into separate logs, and
  +asynchronous DNS resolving on the fly.
  +
   /ul
   
   !--#include virtual=footer.html --
  
  
  
  1.436 +11 -1 apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.435
  retrieving revision 1.436
  diff -u -r1.435 -r1.436
  --- CHANGES   1997/09/12 19:53:10 1.435
  +++ CHANGES   1997/09/12 20:13:03 1.436
  @@ -1,6 +1,16 @@
   Changes with Apache 1.3b1
   
  -  *) set_last_modified() broken into set_last_modified(), set_etag(), and
  +  *) API: New register_other_child() API (see http_main.h) which allows
  + modules to register children with the parent for maintenance.  It
  + is disabled by defining NO_OTHER_CHILD.  [Dean Gaudet]
  +
  +  *) API: New piped_log API (see http_log.h) which implements piped logs,
  + and will use register_other_child to implement reliable piped logs
  + when it is available.  The reliable piped logs part can be disabled
  + by defining NO_RELIABLE_PIPED_LOGS.  At the moment reliable piped
  + logs is only available on Unix. [Dean Gaudet]
  +
  +  *) API: set_last_modified() broken into set_last_modified(), set_etag(), 
and
meets_conditions().  This allows conditional HTTP selection to be
handled separately from the storing of the header fields, and provides
the ability for CGIs to set their own ETags for conditional checking.
  
  
  
  1.12  +10 -0 apachen/src/PORTING
  
  Index: PORTING
  ===
  RCS file: /export/home/cvs/apachen/src/PORTING,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- PORTING   1997/09/01 21:47:46 1.11
  +++ PORTING   1997/09/12 20:13:05 1.12
  @@ -256,6 +256,16 @@
  an int *len on some architectures and a size_t *len on others.
  If left undefined apache will default it to int.
   
  +  NO_OTHER_CHILD:
  +   Do not implement the register_other_child API, usually because
  +   certain system calls aren't available.
  +
  +  NO_RELIABLE_PIPED_LOGS:
  +   Do not use reliable piped logs, which happen to also require
  +   the register_other_child API.  The reliable piped log code
  +   requires another child spawning interface which hasn't been
  +   generalised yet.
  +
   ---
   Conclusion:
   ---
  
  
  
  1.136 +8 -0  apachen/src/main/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.135
  retrieving revision 1.136
  diff -u -r1.135 -r1.136
  --- conf.h1997/09/12 08:09:09 1.135
  +++ conf.h1997/09/12 20:13:07 1.136
  @@ -445,6 +445,7 @@
   #undef NO_KILLPG
   #define

cvs commit: apachen/htdocs/manual new_features_1_3.html

1997-09-12 Thread Dean Gaudet
dgaudet 97/09/12 13:42:28

  Modified:htdocs/manual new_features_1_3.html
  Log:
  add mod_speling, submitted by Martin
  
  Revision  ChangesPath
  1.22  +15 -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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- new_features_1_3.html 1997/09/12 20:13:01 1.21
  +++ new_features_1_3.html 1997/09/12 20:42:26 1.22
  @@ -30,6 +30,21 @@
   
   ul
LIA
  +  HREF=mod/mod_speling.html
  + STRONGOptional laquo;Spelling Correctionraquo; module added to 
distribution/STRONG/A
  +  BR
  +  This optional module corrects frequently occurring spelling errors in
  +  document names requested from the server. This includes the correction
  +  of miscapitalized requests (as was available in a separately available
  +  EMmod_speling/EM module as of Apache 1.1 already) but extends
  +  spelling correction to single inserted, omitted, transposed or
  +  mistyped characters. This catches the majority of mistyped requests.
  +  To make use of this module, it must be enabled in the server's
  +  CODEConfiguration/CODE file, and the
  +  CODEA HREF=mod/mod_speling.html#checkspellingCheckSpelling/A/CODE
  +  directive must be set to CODEon/CODE.
  + /LI
  + LIA
 HREF=mod/mod_setenvif.html
STRONGEnhanced Conditional Setting of Environment 
Variables/STRONG/A
 BR
  
  
  


cvs commit: apache-devsite mmn.txt

1997-09-12 Thread Dean Gaudet
dgaudet 97/09/12 13:47:23

  Modified:.mmn.txt
  Log:
  a busy day for the API
  
  Revision  ChangesPath
  1.6   +6 -0  apache-devsite/mmn.txt
  
  Index: mmn.txt
  ===
  RCS file: /export/home/cvs/apache-devsite/mmn.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mmn.txt   1997/09/02 16:27:07 1.5
  +++ mmn.txt   1997/09/12 20:47:22 1.6
  @@ -18,3 +18,9 @@
   19970825 (1.3a2-dev) - r-mtime cell added
   19970831 (1.3a2-dev) - error logging changed to use aplog_error()
   19970902 (1.3a2-dev) - MD5 routines and structures renamed to ap_*
  +19970912 (1.3b1-dev) - set_last_modified split into set_last_modified,
  + set_etag and meets_conditions
  +  - register_other_child API
  +  - piped_log API
  +  - short_score split into parent and child pieces
  +  - os_is_absolute_path
  
  
  


cvs commit: apachen/src/main httpd.h

1997-09-12 Thread Dean Gaudet
dgaudet 97/09/12 15:39:02

  Modified:src/main httpd.h
  Log:
  yet another #ifndef wrapper
  
  Revision  ChangesPath
  1.148 +2 -0  apachen/src/main/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apachen/src/main/httpd.h,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- httpd.h   1997/09/07 15:39:48 1.147
  +++ httpd.h   1997/09/12 22:38:59 1.148
  @@ -88,7 +88,9 @@
   #endif /* DOCUMENT_LOCATION */
   
   /* Max. number of dynamically loaded modules */
  +#ifndef DYNAMIC_MODULE_LIMIT
   #define DYNAMIC_MODULE_LIMIT 64
  +#endif
   
   /* Default administrator's address */
   #define DEFAULT_ADMIN [no address given]
  
  
  


cvs commit: apachen/src/main http_core.c http_request.c

1997-09-11 Thread Dean Gaudet
dgaudet 97/09/11 11:46:47

  Modified:src/main http_core.c http_request.c
  Log:
  I know we're about to commit os abstraction, but this bug bugs me.  This
  fixes a bug I introduced with the directory_walk optimization where I
  test absolute paths in a non-portable way.
  
  Revision  ChangesPath
  1.120 +6 -0  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.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- http_core.c   1997/09/09 18:39:17 1.119
  +++ http_core.c   1997/09/11 18:46:44 1.120
  @@ -267,8 +267,14 @@
* See directory_walk().
*/
   
  +#if defined(__EMX__) || defined(WIN32)
  +#define IS_SPECIAL(entry_core)   \
  +((entry_core)-r != NULL \
  + || ((entry_core)-d[0] != '/'  (entry_core)-d[1] != ':'))
  +#else
   #define IS_SPECIAL(entry_core)   \
   ((entry_core)-r != NULL || (entry_core)-d[0] != '/')
  +#endif
   
   /* We need to do a stable sort, qsort isn't stable.  So to make it stable
* we'll be maintaining the original index into the list, and using it
  
  
  
  1.82  +4 -3  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.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- http_request.c1997/08/31 21:28:53 1.81
  +++ http_request.c1997/09/11 18:46:45 1.82
  @@ -383,10 +383,11 @@
entry_dir = entry_core-d;
   
if (entry_core-r
  -/* FIXME: Temporarily removed, pending an explanation of function, in order 
to
  -  fix Win32 [Ben]
  +#if defined(__EMX__) || defined(WIN32)
  + || (entry_core[0] != '/'  entry_core[1] != ':')
  +#else
|| entry_dir[0] != '/'
  -*/
  +#endif
|| entry_core-d_components  i) break;
   
this_conf = NULL;
  
  
  


cvs commit: apachen/src CHANGES

1997-09-08 Thread Dean Gaudet
dgaudet 97/09/08 18:24:36

  Modified:src  CHANGES
  Log:
  forgot to doc OPTIMIZE_TIMEOUTS
  
  Revision  ChangesPath
  1.429 +8 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.428
  retrieving revision 1.429
  diff -u -r1.428 -r1.429
  --- CHANGES   1997/09/05 00:26:29 1.428
  +++ CHANGES   1997/09/09 01:24:31 1.429
  @@ -1,5 +1,13 @@
   Changes with Apache 1.3a2
   
  +  *) Implement a new timer scheme which eliminates the need to call alarm() 
all
  + the time.  Instead a counter in the scoreboard for each child is used to
  + show when the child has made forward progress.  The parent samples this
  + counter every scoreboard maintenance cycle, and issues SIGALRM if no
  + progress has been made in the timeout period.  This reduces the static
  + request best-case syscall count to 22 from 29.  This scheme is only
  + used by systems with memory-based scoreboards.  [Dean Gaudet]
  +
 *) The proxy now properly handles CONNECT requests which are sent
to proxy servers when using ProxyRemote.  [Marc Slemko, PR#1024]
   
  
  
  


cvs commit: apachen/src/main http_protocol.c

1997-09-05 Thread Dean Gaudet
dgaudet 97/09/05 18:03:35

  Modified:src/main http_protocol.c
  Log:
  add comment about zero-copy tcp under solaris 2.6
  
  Revision  ChangesPath
  1.160 +3 -0  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.159
  retrieving revision 1.160
  diff -u -r1.159 -r1.160
  --- http_protocol.c   1997/09/03 21:50:57 1.159
  +++ http_protocol.c   1997/09/06 01:03:33 1.160
  @@ -1774,6 +1774,9 @@
* entire transaction to complete.  Essentially this should be small enough
* so that in one Timeout period, your slowest clients should be reasonably
* able to receive this many bytes.
  + *
  + * To take advantage of zero-copy TCP under Solaris 2.6 this should be a
  + * multiple of 16k.  (And you need a SunATM2.0 network card.)
*/
   #ifndef MMAP_SEGMENT_SIZE
   #define MMAP_SEGMENT_SIZE32768
  
  
  


cvs commit: apachen/src/main http_log.c

1997-08-25 Thread Dean Gaudet
dgaudet 97/08/25 01:24:16

  Modified:src/main http_log.c
  Log:
  not everything has LOG_FTP
  
  Revision  ChangesPath
  1.23  +2 -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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- http_log.c1997/08/25 02:00:40 1.22
  +++ http_log.c1997/08/25 08:24:15 1.23
  @@ -72,7 +72,9 @@
   {authpriv,LOG_AUTHPRIV},
   {cron, LOG_CRON},
   {daemon,   LOG_DAEMON},
  +#ifdef LOG_FTP
   {ftp,  LOG_FTP},
  +#endif
   {kern, LOG_KERN},
   {lpr,  LOG_LPR},
   {mail, LOG_MAIL},
  
  
  


cvs commit: apache-devsite anoncvs.txt binbuild.sh index.html

1997-08-22 Thread Dean Gaudet
dgaudet 97/08/22 21:42:27

  Modified:.index.html
  Added:   .anoncvs.txt binbuild.sh
  Log:
  Adding Marc's anoncvs and binbuild.sh.
  
  Revision  ChangesPath
  1.9   +5 -0  apache-devsite/index.html
  
  Index: index.html
  ===
  RCS file: /export/home/cvs/apache-devsite/index.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- index.html1997/07/20 13:56:28 1.8
  +++ index.html1997/08/23 04:42:25 1.9
  @@ -68,6 +68,8 @@
   distribution kits/A
   (last modified on !--#flastmod virtual=how-to-release.html --)
  /LI
  +   LIA a href=binbuild.shshell script to build a binary release/a.
  +   /LI
  LIRecord of changes to the
   A
HREF=mmn
  @@ -88,6 +90,9 @@
  LIThe A HREF=from-cvs/latest source tree/A pulled from the
  CVS repository.  Not guaranteed to do anything, especially not
  compile or work.
  +   /LI
  +   LIa href=anoncvs.txtInstructions/a
  + on using anonymous CVS to access the development repository.
  /LI
  LIA Web-based view of the
   A
  
  
  
  1.1  apache-devsite/anoncvs.txt
  
  Index: anoncvs.txt
  ===
  
  From [EMAIL PROTECTED] Fri Aug 22 20:23:50 1997
  Date: Sun, 17 Aug 1997 12:55:12 -0600 (MDT)
  From: Marc Slemko [EMAIL PROTECTED]
  Reply-To: new-httpd@apache.org
  To: TLOSAP new-httpd@apache.org
  Subject: how to use anoncvs
  
HOW TO USE ANONCVS
  ==
  
  Developers with commit access to the Apache source tree normally
  use CVS to keep their local copies of the source tree up to date
  automatically.  This is a very useful ability that also allows
  for getting change history of files, diffs between arbitrary 
  versions, etc.  This is also the method used to commit changes 
  to the source tree.
  
  For those who do not have commit access to the source tree, anoncvs
  offers an alternative way to do most of this using a copy of the
  CVS repository.  The big difference is, of course, that you can't
  commit changes using anoncvs.
  
  The first step in using anoncvs is setting your CVSROOT environment 
  variable.  This tells CVS what server to connect to.  Currently
  the only available method on this anoncvs server is pserver; you
  need a reasonably recent CVS client to use it.  An example of 
  setting it from a bourne shell:
  
[EMAIL PROTECTED]:~$ CVSROOT=:pserver:[EMAIL PROTECTED]:/cvs
[EMAIL PROTECTED]:~$ export CVSROOT
  
  It is very important that you do not put a trailing / on /cvs.
  
  Once you have set your CVSROOT, you need to login:
  
[EMAIL PROTECTED]:~$ cvs login
(Logging in to [EMAIL PROTECTED]:/cvs)
CVS password: 
  
  You can use anything you like for the password; it does not matter.  
  
  
  To check out the current development tree:
  
[EMAIL PROTECTED]:~$ cvs checkout apachen
cvs server: Updating apachen
U apachen/ABOUT_APACHE
U apachen/CHANGES
U apachen/KEYS
[...]
U apachen/src/support/suexec.c
U apachen/src/support/suexec.h
[EMAIL PROTECTED]:~$ ls apachen
ABOUT_APACHEKEYSREADME.NT   conflogs
CHANGES LICENSE cgi-bin htdocs  src
CVS README  cgi-src icons
  
  To checkout the current 1.2 tree:
  
[EMAIL PROTECTED]:~$ cvs checkout -rAPACHE_1_2_X apache
  
  After 1.3a1, there was a source tree reorganization which resulted
  in the tree being split into apache and apachen.  apache is everything
  from before the reorganization, apachen is from after.  apachen still
  retains the change histories of the files, however since they are
  in different locations you can not build an apachen tree from 
  before the reorganization.
  
  To update your local tree to the latest version:
  
[EMAIL PROTECTED]:~$ cvs update -dP apachen
  
  or
  
[EMAIL PROTECTED]:~/apachen/$ cvs update -dP .
  
  etc.  If you have a branch such as the 1.2 branch checked out, you need
  to use something like:
 
[EMAIL PROTECTED]:~$ cvs update -rAPACHE_1_2_X -dP apache
  
  While doing any update, you will notice several different status flags, eg.:
  
P core/buff.c
P core/conf.h
RCS file: /export/home/cvs/apachen/src/core/http_core.c,v
retrieving revision 1.109
retrieving revision 1.110
Merging differences between 1.109 and 1.110 into http_core.c
M core/http_core.c
  
  The P means that the local copy was patched to update it to the 
  current version.  The M means that your local copy was modified,
  but that the changes were merged into your copy successfully.  If
  you see a C that means that there was a conflict in merging 
  the changes and that you need to review the file 

cvs commit: apachen/htdocs/manual windows.html

1997-08-22 Thread Dean Gaudet
dgaudet 97/08/22 21:47:26

  Modified:htdocs/manual windows.html
  Log:
  Add warning about NT.
  
  Reviewed by:  Brian Behlendorf, Randy Terbush, Paul Sutton
  
  Revision  ChangesPath
  1.5   +6 -0  apachen/htdocs/manual/windows.html
  
  Index: windows.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/windows.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- windows.html  1997/07/22 22:33:14 1.4
  +++ windows.html  1997/08/23 04:47:24 1.5
  @@ -25,6 +25,12 @@
  use our a href=http://www.apache.org/bug_report.html;bug reporting
  page./a/p
   
  +pbWarning: Apache on NT has not yet been optimized for performance.
  +Apache still performs best, and is most reliable on Unix platforms.  Over
  +time we will improve NT performance. Folks doing comparative reviews
  +of webserver performance are asked to compare against Apache
  +on a Unix platform such as Solaris, FreeBSD, or Linux./b/p
  +
   hr
   
   ul
  
  
  


cvs commit: apachen README.NT

1997-08-22 Thread Dean Gaudet
dgaudet 97/08/22 21:48:49

  Modified:.README.NT
  Log:
  Add warning about NT.
  
  Reviewed by:Brian Behlendorf, Randy Terbush, Paul Sutton
  
  Revision  ChangesPath
  1.3   +6 -0  apachen/README.NT
  
  Index: README.NT
  ===
  RCS file: /export/home/cvs/apachen/README.NT,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- README.NT 1997/07/21 21:26:52 1.2
  +++ README.NT 1997/08/23 04:48:48 1.3
  @@ -9,6 +9,12 @@
   
   Alexei Kosut [EMAIL PROTECTED] - July 21, 1997
   
  +WARNING: Apache on NT has not yet been optimized for performance.
  +Apache still performs best, and is most reliable on Unix platforms.
  +Over time we will improve NT performance. Folks doing comparative reviews
  +of webserver performance are asked to compare against Apache on a Unix
  +platform such as Solaris, FreeBSD, or Linux.
  +
   Integration with official Apache sources
   
   
  
  
  


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

1997-08-21 Thread Dean Gaudet
dgaudet 97/08/21 11:12:25

  Modified:src  Configuration.tmpl Configure
   src/helpers TestCompile
   src/modules/standard mod_auth_db.module mod_auth_dbm.c
  Log:
  Add TestCompile func to test if a certain func exists in the already
  supplied libraries.  Move dbm/db specific code from Configure into the
  appropriate module file.  Disable the printing of module commands ...
  they were like total spam when the rest of this patch is taken into
  account.
  
  Revision  ChangesPath
  1.73  +1 -1  apachen/src/Configuration.tmpl
  
  Index: Configuration.tmpl
  ===
  RCS file: /export/home/cvs/apachen/src/Configuration.tmpl,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- Configuration.tmpl1997/08/18 07:17:21 1.72
  +++ Configuration.tmpl1997/08/21 18:12:16 1.73
  @@ -240,8 +240,8 @@
   ## gdbm package if not and possibly adjust EXTRA_LIBS. (This may be
   ## done by Configure at a later date)
   
  -# AddModule modules/standard/mod_auth_db.o
   # AddModule modules/standard/mod_auth_dbm.o
  +# AddModule modules/standard/mod_auth_db.o
   
   ## msql_auth checks against an mSQL database.  You must have mSQL installed
   ## and an msql.h available for this to even compile.  Additionally,
  
  
  
  1.137 +0 -2  apachen/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.136
  retrieving revision 1.137
  diff -u -r1.136 -r1.137
  --- Configure 1997/08/18 06:05:34 1.136
  +++ Configure 1997/08/21 18:12:17 1.137
  @@ -767,10 +767,8 @@
modname=`grep Name: $tmpfile2 | sed 's/^.*Name:[  ]*//'`
if grep ConfigStart $tmpfile2  /dev/null \
  grep ConfigEnd $tmpfile2  /dev/null; then
  - echo o $modname runs:
sed '1,/ConfigStart/d;/ConfigEnd/,$d' $tmpfile2  \
 $tmpfile3
  - sed 's/^/ /' $tmpfile3
. ./$tmpfile3
fi
rm -f $tmpfile2 $tmpfile3
  
  
  
  1.5   +22 -4 apachen/src/helpers/TestCompile
  
  Index: TestCompile
  ===
  RCS file: /export/home/cvs/apachen/src/helpers/TestCompile,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestCompile   1997/08/10 20:28:03 1.4
  +++ TestCompile   1997/08/21 18:12:21 1.5
  @@ -1,6 +1,6 @@
   #!/bin/sh
   exstat=1
  -trap 'rm -f Makefile dummy; exit $exstat' 0 1 2 3 15
  +trap 'rm -f Makefile dummy testfunc.c testfunc; exit $exstat' 0 1 2 3 15
   #
   # Yet another Apache Configure helper script.
   # This script tests certain aspects of the compilation
  @@ -23,6 +23,8 @@
   # also call it as './helpers/TestCompile'
   #
   
  +cd ./helpers
  +
   #
   # Handle verbose and silent flags
   #
  @@ -52,6 +54,7 @@
else
ERRDIR='2/dev/null'
fi
  + TARGET='dummy'
;;
   sanity)
TLIB=
  @@ -60,6 +63,20 @@
else
ERRDIR=
fi
  + TARGET='dummy'
  + ;;
  +func)
  + if [ x$2 = x ]; then
  + exit
  + fi
  + TLIB=
  + ERRDIR='2/dev/null'
  + TARGET='testfunc'
  + cat EOF testfunc.c
  +void main(void) {
  +$2();
  +}
  +EOF
;;
   *)
exit
  @@ -69,7 +86,6 @@
   #
   # Get makefile settings and build a basic Makefile
   #
  -cd ./helpers
   rm -f dummy
   cat ../Makefile.config  Makefile
   cat EOF  Makefile
  @@ -81,13 +97,15 @@
   dummy:
\$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) dummy.c -o dummy $TLIB
   
  +testfunc:
  + \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) testfunc.c -o testfunc 
\$(LIBS)
   EOF
   
   # Now run that Makefile
  -eval make dummy /dev/null $ERRDIR
  +eval make $TARGET /dev/null $ERRDIR
   
   # And see if dummy exists, if so, then we assume the 
   # condition we are testing for is good
  -if [ -f dummy ]; then
  +if [ -f $TARGET ]; then
   exstat=0
   fi
  
  
  
  1.3   +14 -12apachen/src/modules/standard/mod_auth_db.module
  
  Index: mod_auth_db.module
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_auth_db.module,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_auth_db.module1997/08/18 06:05:36 1.2
  +++ mod_auth_db.module1997/08/21 18:12:23 1.3
  @@ -1,16 +1,18 @@
   Name: db_auth_module
   ConfigStart
  -case $PLAT in
  - *-linux*)
  - # many systems have -ldb installed
  - DB_LIB=
  - if ./helpers/TestCompile lib db; then
  - DB_LIB=-ldb
  - fi
  - ;;
  -esac
  -LIBS=$LIBS $DB_LIB

cvs commit: apachen/src/core http_request.c httpd.h

1997-08-19 Thread Dean Gaudet
dgaudet 97/08/19 00:52:44

  Modified:src/core http_request.c httpd.h
  Log:
  Fix a bug introduced by Ben's canonical name patch.  And avoid a strdup
  that's not necessary.
  
  Revision  ChangesPath
  1.78  +1 -1  apachen/src/core/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apachen/src/core/http_request.c,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- http_request.c1997/08/18 10:59:04 1.77
  +++ http_request.c1997/08/19 07:52:42 1.78
  @@ -261,7 +261,7 @@
* fake one. But don't run through the directory entries.
*/
   
  -if (test_filename == NULL) {
  +if (r-filename == NULL) {
   r-filename = pstrdup(r-pool, r-uri);
r-finfo.st_mode = 0;   /* Not really a file... */
   r-per_dir_config = per_dir_defaults;
  
  
  
  1.141 +3 -3  apachen/src/core/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apachen/src/core/httpd.h,v
  retrieving revision 1.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- httpd.h   1997/08/18 10:59:04 1.140
  +++ httpd.h   1997/08/19 07:52:42 1.141
  @@ -832,10 +832,10 @@
   API_EXPORT(void) chdir_file(const char *file);
   
   #ifndef HAVE_CANONICAL_FILENAME
  -#define os_canonical_filename(p,f)  pstrdup(p,f)
  -#endif
  -
  +#define os_canonical_filename(p,f)  (f)
  +#else
   API_EXPORT(char *)os_canonical_filename(pool *p,const char *file);
  +#endif

   char *get_local_host(pool *);
   unsigned long get_virthost_addr (const char *hostname, unsigned short *port);
  
  
  


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

1997-08-19 Thread Dean Gaudet
dgaudet 97/08/19 18:24:41

  Modified:src/modules/standard mod_mime_magic.c
  Log:
  remove unreachable code
  
  Revision  ChangesPath
  1.12  +1 -2  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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_mime_magic.c  1997/08/18 13:12:16 1.11
  +++ mod_mime_magic.c  1997/08/20 01:24:40 1.12
  @@ -1581,9 +1581,8 @@
   /* At MIME-typing time we want to follow symlinks */
   /* So just handle it. */
   magic_process(r);
  -return 1;
   }
  -return 1;
  + return 1;
   #endif
   #ifdefS_IFSOCK
   #ifndef __COHERENT__
  
  
  


cvs commit: apachen/src/core conf.h http_core.c http_protocol.c http_protocol.h

1997-08-18 Thread Dean Gaudet
dgaudet 97/08/18 00:19:39

  Modified:htdocs/manual new_features_1_3.html
   src  CHANGES PORTING
   src/core conf.h http_core.c http_protocol.c http_protocol.h
  Log:
  Added mmap() support for static files going through default_handler.
  
  Revision  ChangesPath
  1.18  +1 -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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- new_features_1_3.html 1997/08/18 07:17:19 1.17
  +++ new_features_1_3.html 1997/08/18 07:19:30 1.18
  @@ -193,7 +193,7 @@
to issue multiple writes with a single system call.  They also avoid
copying memory into buffers as much as possible.  The result is
less CPU time spent on transferring large files.
  -liiXXX Incomplete:/i Static requests are served using
  +liStatic requests are served using
codemmap/code, which means bytes are only copied from the
disk buffer to the network buffer directly by the kernel.  The
program never copies bytes around, which reduces CPU time.
  
  
  
  1.404 +7 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.403
  retrieving revision 1.404
  diff -u -r1.403 -r1.404
  --- CHANGES   1997/08/18 07:17:21 1.403
  +++ CHANGES   1997/08/18 07:19:31 1.404
  @@ -1,5 +1,12 @@
   Changes with Apache 1.3a2
   
  +  *) Various architectures now define USE_MMAP_FILES which causes
  + the server to use mmap() for static files.  There are two
  + compile-time tunables MMAP_THRESHOLD (minimum number of bytes
  + required to use mmap(), default is 0), and MMAP_SEGMENT_SIZE (maximum
  + number of bytes written in one cycle from a single mmap()d object,
  + default 32768).  [Dean Gaudet]
  +
 *) API: Added post_read_request API phase which is run right after reading
the request from a client, or right after an internal redirect.  It is
useful for modules setting environment variables that depend only on
  
  
  
  1.10  +5 -1  apachen/src/PORTING
  
  Index: PORTING
  ===
  RCS file: /export/home/cvs/apachen/src/PORTING,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PORTING   1997/08/09 00:55:53 1.9
  +++ PORTING   1997/08/18 07:19:32 1.10
  @@ -171,7 +171,8 @@
   HAVE_MMAP:
 Define if the OS supports the BSD mmap() call. This is used by various
 OSs to allow the scoreboard file to be held in shared mmapped-memory
  -  instead of a real file.
  +  instead of a real file.  Note that this is only used to determine
  +  if mmap should be used for shared memory.
   
   HAVE_SHMGET:
 Define if the OS has the SysV-based shmget() family of shared-memory
  @@ -213,6 +214,9 @@
USE_LONGJMP:
 use the longjmp() call instead of siglongjmp()
 (as well as setjmp() instead of sigsetjmp())
  + 
  + USE_MMAP_FILES:
  +  Enable the use of mmap() for sending static files.
   
   --
   
  
  
  
  1.125 +12 -0 apachen/src/core/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/core/conf.h,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- conf.h1997/08/17 11:14:34 1.124
  +++ conf.h1997/08/18 07:19:34 1.125
  @@ -85,6 +85,7 @@
   char *mktemp(char *template);
   #define JMP_BUF sigjmp_buf
   #define HAVE_MMAP
  +#define USE_MMAP_FILES
   #include sys/time.h 
   #define NEED_STRERROR
   typedef int rlim_t;
  @@ -105,6 +106,7 @@
   #define USE_PTHREAD_SERIALIZED_ACCEPT
   #define NEED_UNION_SEMUN
   #define HAVE_MMAP
  +#define USE_MMAP_FILES
   #define HAVE_CRYPT_H
   int gethostname(char *name, int namelen);
   
  @@ -118,6 +120,7 @@
   /*#define USE_FCNTL_SERIALIZED_ACCEPT*/
   #define USE_SYSVSEM_SERIALIZED_ACCEPT
   #define HAVE_SHMGET
  +#define USE_MMAP_FILES
   #define HAVE_CRYPT_H
   #define NO_LONG_DOUBLE
   #define HAVE_BSTRING_H
  @@ -158,6 +161,7 @@
   #define JMP_BUF sigjmp_buf
   #ifndef __ps2__
   #define HAVE_MMAP
  +#define USE_MMAP_FILES
   #define DEFAULT_GROUP nobody
   #endif
   #define DEFAULT_USER nobody
  @@ -183,6 +187,7 @@
   #undef NO_SETSID
   #define JMP_BUF sigjmp_buf
   #define HAVE_MMAP
  +#define USE_MMAP_FILES
   #define HAVE_CRYPT_H
   #define NO_LONG_DOUBLE
   
  @@ -192,6 +197,7 @@
   #undef NO_SETSID
   #define JMP_BUF sigjmp_buf
   #define HAVE_MMAP
  +#define USE_MMAP_FILES
   #define HAVE_CRYPT_H
   #define NO_LONG_DOUBLE
   typedef int rlim_t

cvs commit: apachen/htdocs/manual new_features_1_3.html

1997-08-18 Thread Dean Gaudet
dgaudet 97/08/18 00:26:27

  Modified:htdocs/manual new_features_1_3.html
  Log:
  tweak tweak
  
  Revision  ChangesPath
  1.19  +2 -2  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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- new_features_1_3.html 1997/08/18 07:19:30 1.18
  +++ new_features_1_3.html 1997/08/18 07:26:26 1.19
  @@ -185,7 +185,7 @@
speedups on configs with a lot of sections.
   liThe critical path for static requests has fewer system calls.  This
generally helps all requests.  (45 syscalls for a static request
  - in 1.2 versus 22 in 1.3).
  + in 1.2 versus 22 in 1.3 in a well tuned configuration).
   lia href=mod/mod_proxy.html#ReceiveBufferSizeReceiveBufferSize/a
directive gives mod_proxy's outgoing connections larger network
buffers, for increased throughput.
  @@ -213,7 +213,7 @@
   /ul
   
   listrongUnique Identifiers/strongbr
  -mod_uniqid can be included to generate a unique identifier that
  +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
  
  
  


cvs commit: apachen/src/core conf.h http_core.c http_main.c httpd.h

1997-08-17 Thread Dean Gaudet
dgaudet 97/08/17 04:14:38

  Modified:htdocs/manual new_features_1_3.html
   src  CHANGES Configure
   src/core conf.h http_core.c http_main.c httpd.h
  Log:
  Add new mutexes (sysvsem, solaris pthreads, irix uslocks).
  Add SAFE_UNSERIALIZED_ACCEPT support.
  
  Submitted by: Dean Gaudet,
  Submitted by: Pierre-Yves Kerembellec [EMAIL PROTECTED],
  Submitted by: Martijn Koster [EMAIL PROTECTED]
  Reviewed by:  Paul Sutton
  
  Revision  ChangesPath
  1.15  +2 -2  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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- new_features_1_3.html 1997/08/11 10:04:43 1.14
  +++ new_features_1_3.html 1997/08/17 11:14:29 1.15
  @@ -208,8 +208,8 @@
performed for each hit, now it is performed only once per second.
This should be noticeable on servers running with hundreds of
children and high loads.
  -liiXXX Incomplete:/i New serialization choices improve performance
  - on Linux, Solaris, and IRIX.
  +liNew serialization choices improve performance on Linux, Solaris,
  + and IRIX.
   /ul
   
   /ul
  
  
  
  1.399 +27 -3 apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.398
  retrieving revision 1.399
  diff -u -r1.398 -r1.399
  --- CHANGES   1997/08/17 02:31:47 1.398
  +++ CHANGES   1997/08/17 11:14:31 1.399
  @@ -1,5 +1,32 @@
   Changes with Apache 1.3a2
   
  +  *) PORT: Apache has need for mutexes to serialize its children around
  + accept.  In prior versions either fcntl file locking or flock file
  + locking were used.  The method is chosen by the definition of
  + USE_xxx_SERIALIZED_ACCEPT in conf.h.  xxx is FCNTL for fcntl(),
  + and FLOCK for flock().  New options have been added:
  + - SYSVSEM to use System V style semaphores
  + - PTHREAD to use Posix threads (appears to work on Solaris only)
  + - USLOCK to use IRIX uslock
  + Based on timing various techniques, the following changes were made
  + to the defaults:
  + - Linux 2.x uses flock instead of fcntl
  + - Solaris 2.x uses pthreads
  + - IRIX uses SysV semaphores -- however multiprocessor IRIX boxes
  + work far faster if you -DUSE_USLOCK_SERIALIZED_ACCEPT
  + [Dean Gaudet, Pierre-Yves Kerembellec [EMAIL PROTECTED],
  + Martijn Koster [EMAIL PROTECTED]]
  +
  +  *) PORT: The semantics of accept/select make it very desirable to use
  + mutexes to serialize accept when multiple Listens are in use.  But
  + in the case where only a single socket is open it is sometimes
  + redundant to serialize accept().  Not all unixes do a good job with
  + potentially dozens of children blocked on accept() on the same
  + socket.  It's now possible to define SAFE_UNSERIALIZED_ACCEPT and
  + the server will avoid serialization when listening on only one socket,
  + and use serialization when listening on multiple sockets.
  + [Dean Gaudet] PR#467
  +
 *) Configure changes: TestLib replaced by TestCompile, which has
some additional capability (such as doing a sanity check of
the compiler and flags selected); the version of Solaris is now
  @@ -9,9 +36,6 @@
   
 *) mod_browser has been removed, since it's replaced by mod_setenvif.
[Ken Coar]
  -
  -  *) PORT: Timings show that on Linux 2.0.30 flock is slightly cheaper than
  - fcntl file locking.  So use flock for the mutexes. [Dean Gaudet]
   
 *) Fix another long-standing bug in sub_req_lookup_file where it would
happily skip past access checks on subdirectories looked up with
  
  
  
  1.135 +1 -1  apachen/src/Configure
  
  Index: Configure
  ===
  RCS file: /export/home/cvs/apachen/src/Configure,v
  retrieving revision 1.134
  retrieving revision 1.135
  diff -u -r1.134 -r1.135
  --- Configure 1997/08/15 18:12:06 1.134
  +++ Configure 1997/08/17 11:14:32 1.135
  @@ -358,7 +358,7 @@
SOLVER=`echo $PLAT | sed -e 's/^.*solaris2.//'`
OS=Solaris $SOLVER
CFLAGS=$CFLAGS -DSOLARIS2=$SOLVER
  - LIBS=$LIBS -lsocket -lnsl
  + LIBS=$LIBS -lsocket -lnsl -lpthread
DBM_LIB=
case $SOLVER in
2[0123]*)
  
  
  
  1.124 +6 -2  apachen/src/core/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apachen/src/core/conf.h,v
  retrieving revision 1.123
  retrieving revision 1.124
  diff -u -r1.123 -r1.124
  --- conf.h1997/08/15 18:12:09 1.123
  +++ conf.h1997

cvs commit: apachen/src/core http_core.c http_request.c

1997-08-17 Thread Dean Gaudet
dgaudet 97/08/17 13:21:38

  Modified:src/core http_core.c http_request.c
  Log:
  Fix a bug introduced during the directory_walk() optimizations most recently
  checked in.  Includes a rewrite of core_reorder_directories, and removes
  some cruft code from {directory,file,locaiton}_walk.
  
  Reviewed by:  Rob Hartill
  
  Revision  ChangesPath
  1.111 +72 -56apachen/src/core/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apachen/src/core/http_core.c,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- http_core.c   1997/08/17 11:14:34 1.110
  +++ http_core.c   1997/08/17 20:21:36 1.111
  @@ -237,74 +237,90 @@
   *new_space = url_config;
   }
   
  -/* This routine reorders the directory sections such that the 1-component
  - * sections come first, then the 2-component, and so on, finally followed by
  - * the special sections.  A section is special if it's a regex, or if it
  - * doesn't start with / -- consider proxy: matching.  All movements are
  - * in-order to preserve the ordering of the sections from the config files.
  +/* core_reorder_directories reorders the directory sections such that the
  + * 1-component sections come first, then the 2-component, and so on, finally
  + * followed by the special sections.  A section is special if it's a 
regex,
  + * or if it doesn't start with / -- consider proxy: matching.  All movements
  + * are in-order to preserve the ordering of the sections from the config 
files.
* See directory_walk().
*/
  +
  +#define IS_SPECIAL(entry_core)   \
  +((entry_core)-r != NULL || (entry_core)-d[0] != '/')
  +
  +/* We need to do a stable sort, qsort isn't stable.  So to make it stable
  + * we'll be maintaining the original index into the list, and using it
  + * as the minor key during sorting.  The major key is the number of
  + * components (where a special section has infinite components).
  + */
  +struct reorder_sort_rec {
  +void *elt;
  +int orig_index;
  +};
  +
  +static int reorder_sorter (const void *va, const void *vb)
  +{
  +const struct reorder_sort_rec *a = va;
  +const struct reorder_sort_rec *b = vb;
  +core_dir_config *core_a;
  +core_dir_config *core_b;
  +
  +core_a = (core_dir_config *)get_module_config (a-elt, core_module);
  +core_b = (core_dir_config *)get_module_config (b-elt, core_module);
  +if (IS_SPECIAL(core_a)) {
  + if (!IS_SPECIAL(core_b)) {
  + return 1;
  + }
  +} else if (IS_SPECIAL(core_b)) {
  + return -1;
  +} else {
  + /* we know they're both not special */
  + if (core_a-d_components  core_b-d_components) {
  + return -1;
  + } else if (core_a-d_components  core_b-d_components) {
  + return 1;
  + }
  +}
  +/* Either their both special, or their both not special and have the
  + * same number of components.  In any event, we now have to compare
  + * the minor key. */
  +return a-orig_index - b-orig_index;
  +}
  +
   void core_reorder_directories (pool *p, server_rec *s)
   {
   core_server_config *sconf;
  -array_header *old_sec;
  -array_header *new_sec;
  +array_header *sec;
  +struct reorder_sort_rec *sortbin;
   int nelts;
  -unsigned n_components;
  -unsigned next_n_components;
  -core_dir_config *entry_core;
  -int still_more_to_go;
  -int i;
   void **elts;
  +int i;
   
  -sconf = get_module_config (s-module_config, core_module);
  -old_sec = sconf-sec;
  -nelts = old_sec-nelts;
  -elts = (void **)old_sec-elts;
  -new_sec = make_array (p, nelts, sizeof(void *));
  -
  -/* First collect all the 1 component names, then the 2 componennt names,
  - * and so on.  We use next_n_components to know what to look for the
  - * next time around... to deal with weird configs with many many many
  - * in at least one Directory.
  +/* 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.
*/
  -n_components = 1;
  -do {
  - /* guess there's none left other than ones with exactly n_components */
  - still_more_to_go = 0;
  - /* guess that what's left has infinite components */
  - next_n_components = ~0u;
  - for (i = 0; i  nelts; ++i) {
  - if (elts[i] == NULL) continue;
  - entry_core = (core_dir_config *)get_module_config (elts[i],
  - core_module);
  - if (entry_core-r) continue;
  - if (entry_core-d[0] != '/') continue;
  - if (entry_core-d_components != n_components) {
  - /* oops, the guess was wrong */
  - still_more_to_go = 1;
  - if 

broken commit logging

1997-08-08 Thread Dean Gaudet
commit logging is broken.  So I'm posting this by hand.

I just committed this patch, which is essentially the patch which I posted
a few days ago for buff.c.  I went line by line comparing it with the 1.2
buff.c and I think we've got all the 1.2 fixes in here now, plus the newer
1.3 stuff.

Dean

Index: buff.c
===
RCS file: /export/home/cvs/apache/src/buff.c,v
retrieving revision 1.42
diff -u -r1.42 buff.c
--- buff.c  1997/08/02 00:58:26 1.42
+++ buff.c  1997/08/08 07:54:45
@@ -190,6 +190,7 @@
 
 #endif /* WIN32 */
 
+/* the lowest level reading primitive */
 static inline int buff_read (BUFF *fb, void *buf, int nbyte)
 {
 int rv;
@@ -208,6 +209,7 @@
 return rv;
 }
 
+/* the lowest level writing primitive */
 static inline int buff_write (BUFF *fb, const void *buf, int nbyte)
 {
 int rv;
@@ -465,27 +467,37 @@
 }
 #endif
 
-static int
+
+API_EXPORT(void) bhalfduplex (BUFF *fb)
+{
+int rv;
+fd_set fds;
+struct timeval tv;
+
+if (fb-incnt  0) {
+   return;
+}
+/* test for a block */
+do {
+   FD_ZERO( fds );
+   FD_SET( fb-fd_in, fds );
+   tv.tv_sec = 0;
+   tv.tv_usec = 0;
+   rv = ap_select( fb-fd_in + 1, fds, NULL, NULL, tv );
+} while( rv  0  errno == EINTR );
+/* treat any error as if it would block as well */
+if( rv != 1 ) {
+   bflush(fb);
+}
+}
+
+static inline int
 saferead_guts(BUFF *fb, void *buf, int nbyte)
 {
 int rv;
 
 if( fb-flags  B_SAFEREAD ) {
-   fd_set fds;
-   struct timeval tv;
-
-   /* test for a block */
-   do {
-   FD_ZERO( fds );
-   FD_SET( fb-fd_in, fds );
-   tv.tv_sec = 0;
-   tv.tv_usec = 0;
-   rv = ap_select( fb-fd_in + 1, fds, NULL, NULL, tv );
-   } while( rv  0  errno == EINTR );
-   /* treat any error as if it would block as well */
-   if( rv != 1 ) {
-   bflush(fb);
-   }
+   bhalfduplex (fb);
 }
 do {
rv = buff_read (fb, buf, nbyte);
@@ -529,6 +541,25 @@
 }
 #endif
 
+
+/* A wrapper around saferead which does error checking and EOF checking
+ * yeah, it's confusing, this calls saferead, which calls buff_read...
+ * and then there's the SFIO case.  Note that saferead takes care
+ * of EINTR.
+ */
+static int read_with_errors (BUFF *fb, void *buf, int nbyte)
+{
+int rv;
+
+rv = saferead (fb, buf, nbyte);
+if (rv == 0) {
+   fb-flags |= B_EOF;
+} else if (rv == -1  errno != EAGAIN) {
+   doerror (fb, B_RD);
+}
+return rv;
+}
+
 /*
  * Read up to nbyte bytes into buf.
  * If fewer than byte bytes are currently available, then return those.
@@ -551,9 +582,7 @@
fb-inptr += i;
return i;
}
-   i = saferead( fb, buf, nbyte );
-   if (i == 0) fb-flags |= B_EOF;
-   if (i == -1  errno != EAGAIN) doerror(fb, B_RD);
+   i = read_with_errors (fb, buf, nbyte);
return i;
 }
 
@@ -577,33 +606,20 @@
 if (fb-flags  B_EOF) return nrd;
 
 /* do a single read */
-if (nbyte = fb-bufsiz)
-{
+if (nbyte = fb-bufsiz) {
 /* read directly into buffer */
-   i = saferead( fb, buf, nbyte );
-   if (i == -1)
-   {
-   if (nrd == 0)
-   {
-   if (errno != EAGAIN) doerror(fb, B_RD);
-   return -1;
-   }
-   else return nrd;
-   } else if (i == 0) fb-flags |= B_EOF;
-} else
-{
+   i = read_with_errors (fb, buf, nbyte);
+   if (i == -1) {
+   return nrd ? nrd : -1;
+   }
+}
+else {
 /* read into hold buffer, then memcpy */
fb-inptr = fb-inbase;
-   i = saferead( fb, fb-inptr, fb-bufsiz );
-   if (i == -1)
-   {
-   if (nrd == 0)
-   {
-   if (errno != EAGAIN) doerror(fb, B_RD);
-   return -1;
-   }
-   else return nrd;
-   } else if (i == 0) fb-flags |= B_EOF;
+   i = read_with_errors (fb, fb-inptr, fb-bufsiz);
+   if (i == -1) {
+   return nrd ? nrd : -1;
+   }
fb-incnt = i;
if (i  nbyte) i = nbyte;
memcpy(buf, fb-inptr, i);
@@ -654,23 +670,13 @@
fb-inptr = fb-inbase;
fb-incnt = 0;
if (fb-flags  B_EOF) break;
-   i = saferead( fb, fb-inptr, fb-bufsiz );
-   if (i == -1)
-   {
+   i = read_with_errors (fb, fb-inptr, fb-bufsiz);
+   if (i == -1) {
buff[ct] = '\0';
-   if (ct == 0)
-   {
-   if (errno != EAGAIN) doerror(fb, B_RD);
-   return -1;
-   }
-   else return ct;
+   return ct ? ct : -1;
}
fb-incnt = i;
-   if (i == 0)
-   {
-   fb-flags |= B_EOF;
-   break; /* EOF */
-   }
+   if (i == 0) break;  /* EOF */
i = 0;
 

cvs commit: apache/htdocs/manual new_features_1_3.html

1997-08-08 Thread Dean Gaudet
dgaudet 97/08/08 04:28:33

  Modified:htdocs/manual new_features_1_3.html
  Log:
  Add a few of the things I worked on.
  
  Revision  ChangesPath
  1.13  +51 -1 apache/htdocs/manual/new_features_1_3.html
  
  Index: new_features_1_3.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/new_features_1_3.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- new_features_1_3.html 1997/07/30 20:08:14 1.12
  +++ new_features_1_3.html 1997/08/08 11:28:32 1.13
  @@ -138,7 +138,21 @@
   directive now defaults to Off. This means that, unless explictly
   turned on, the server will not resolve IP addresses into names. This
   was done to spare the Internet from unneccessary DNS traffic.
  -
  +
  +listrongDouble-Reverse DNS enforced/strongbr
  +The a href=mod/core.html#hostnamelookupsHostnameLookups/a directive
  +now supports double-reverse DNS.  (Known as iPARANOID/i in the
  +terminology of tcp_wrappers.)  An IP address passes a double-reverse
  +DNS test if the forward map of the reverse map includes the original
  +IP.  Regardless of the HostnameLookups setting,
  +a href=mod/mod_access.htmlmod_access/a access lists using DNS
  +names brequire/b all names to pass a double-reverse DNS test.
  +
  +listrongCIDR and Netmask access control/strongbr
  +a href=mod/mod_access.htmlmod_access/a directives now support
  +CIDR (Classless Inter-Domain Routing) style prefixes, and netmasks for
  +greater control over IP access lists.
  +
   listrongNew child_init function for module API/strongbr
   A new phase for Apache's API is called once per heavy-weight process,
   before any requests are handled. This allows the module to set up
  @@ -152,6 +166,42 @@
   listronga href=mod/mod_info.html#addmoduleinfoAddModuleInfo/a
   directive added to a href=mod/mod_info.htmlmod_info/a/strongbr
   Allows additional information to be listed along with a specified module.
  +
  +listrongPerformance Improvements/strong
  +ul
  +liIP-based virtual hosts are looked up via hash table,
  + giving a performance boost on servers with large numbers of vhosts.
  +lilt;Directorygt; parsing of requests has been vastly improved, 
giving
  + speedups on configs with a lot of sections.
  +liThe critical path for static requests has fewer system calls.  This
  + generally helps all requests.  (45 syscalls for a static request
  + in 1.2 versus 29 in 1.3).
  +lia href=mod/mod_proxy.html#ReceiveBufferSizeReceiveBufferSize/a
  + directive gives mod_proxy's outgoing connections larger network
  + buffers, for increased throughput.
  +liThe low level i/o routines use codewritev/code (where available)
  + to issue multiple writes with a single system call.  They also avoid
  + copying memory into buffers as much as possible.  The result is
  + less CPU time spent on transferring large files.
  +liiXXX Incomplete:/i Static requests are served using
  + codemmap/code, which means bytes are only copied from the
  + disk buffer to the network buffer directly by the kernel.  The
  + program never copies bytes around, which reduces CPU time.
  +liWhen presented with a load spike, the server quickly adapts by
  + spawning children at faster rates.
  +liThe code which dispatches modules was optimized to avoid repeatedly
  + skipping over modules that don't implement certain phases of the
  + API.  (This skipping showed up as 5% of the cpu time on profiles of
  + a server with the default module mix.)
  +liRevamp of the Unix scoreboard management code so that less time is
  + spent counting children in various states.  Previously a scan was
  + performed for each hit, now it is performed only once per second.
  + This should be noticeable on servers running with hundreds of
  + children and high loads.
  +liiXXX Incomplete:/i New serialization choices improve performance
  + on Linux, Solaris, and IRIX.
  +/ul
  +
   /ul
   
   !--#include virtual=footer.html --
  
  
  


cvs commit: apache/src http_request.c

1997-08-07 Thread Dean Gaudet
dgaudet 97/08/07 01:15:31

  Modified:src   http_request.c
  Log:
  local shadowing another local ... caused by my recent commit
  
  Revision  ChangesPath
  1.72  +0 -1  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- http_request.c1997/08/06 20:32:19 1.71
  +++ http_request.c1997/08/07 08:15:29 1.72
  @@ -289,7 +289,6 @@
   void *this_conf, *entry_config;
   core_dir_config *entry_core;
char *entry_dir;
  - int j;
   
for (j = 0; j  num_sec; ++j) {
   
  
  
  


cvs commit: apache/src CHANGES http_config.c http_config.h http_request.c

1997-08-06 Thread Dean Gaudet
dgaudet 97/08/06 12:53:56

  Modified:src   CHANGES http_config.c http_config.h http_request.c
  Log:
  This probably fixes Brian's CGI problems.  But at any rate it's necessary
  even if it isn't the exact bug that's tickling Brian.  My first directory_walk
  optimization was corrupting the htaccess cache and the cmd-path passed
  to modules via parse_htaccess().
  
  Revision  ChangesPath
  1.386 +3 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.385
  retrieving revision 1.386
  diff -u -r1.385 -r1.386
  --- CHANGES   1997/08/05 10:49:39 1.385
  +++ CHANGES   1997/08/06 19:53:48 1.386
  @@ -1,4 +1,7 @@
   Changes with Apache 1.3a2
  +  
  +  *) Fix a bug introduced in 1.3a1 directory_walk regarding .htaccess files
  + and corrupted paths.  [Dean Gaudet]
   
 *) Enhanced and cleaned up the URL rewriting engine of mod_rewrite:
First the grouped parts of RewriteRule pattern matches (parenthesis!) 
can
  
  
  
  1.71  +7 -12 apache/src/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apache/src/http_config.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- http_config.c 1997/08/05 06:02:40 1.70
  +++ http_config.c 1997/08/06 19:53:50 1.71
  @@ -884,7 +884,7 @@
   
   
   int parse_htaccess(void **result, request_rec *r, int override,
  -char *d, const char *access_name)
  +const char *d, const char *access_name)
   {
   FILE *f = NULL;
   cmd_parms parms;
  @@ -907,17 +907,12 @@
   parms.pool = r-pool;
   parms.temp_pool = r-pool;
   parms.server = r-server;
  -parms.path = d;
  +parms.path = pstrdup (r-pool, d);
   
  -if (access_name) {
  - while (!f  access_name[0]) {
  - char *w = getword_conf(r-pool, access_name);
  - filename = make_full_path(r-pool, d, w);
  - f=pfopen(r-pool, filename, r);
  - }
  -}
  -else {
  - filename = make_full_path(r-pool, d, 0);
  +/* loop through the access names and find the first one */
  +while (!f  access_name[0]) {
  + char *w = getword_conf(r-pool, access_name);
  + filename = make_full_path(r-pool, d, w);
f=pfopen(r-pool, filename, r);
   }
   if(f) {
  @@ -941,7 +936,7 @@
   
   /* cache it */
   new = palloc(r-pool, sizeof(struct htaccess_result));
  -new-dir = pstrdup(r-pool, d);
  +new-dir = parms.path;
   new-override = override;
   new-htaccess = dc;
   /* add to head of list */
  
  
  
  1.42  +1 -1  apache/src/http_config.h
  
  Index: http_config.h
  ===
  RCS file: /export/home/cvs/apache/src/http_config.h,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- http_config.h 1997/07/28 18:22:43 1.41
  +++ http_config.h 1997/08/06 19:53:50 1.42
  @@ -302,7 +302,7 @@
   /* For http_core.c... (Directory command and virtual hosts) */
   
   int parse_htaccess(void **result, request_rec *r, int override,
  -char *path, const char *access_name);
  +const char *path, const char *access_name);
   const char *srm_command_loop (cmd_parms *parms, void *config);
   
   server_rec *init_virtual_host (pool *p, const char *hostname, server_rec 
*main_server);
  
  
  
  1.69  +15 -16apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- http_request.c1997/08/04 05:14:26 1.68
  +++ http_request.c1997/08/06 19:53:51 1.69
  @@ -251,8 +251,7 @@
   core_dir_config **sec = (core_dir_config **)sec_array-elts;
   int num_sec = sec_array-nelts;
   char *test_filename = pstrdup (r-pool, r-filename);
  -char *test_dirname, *test_htaccess;
  -
  +char *test_dirname;
   int num_dirs, res;
   int i, test_filename_len;
   
  @@ -340,27 +339,27 @@
   
   if (S_ISDIR (r-finfo.st_mode)) ++num_dirs;
   
  -/* we need somewhere to scratch while building directory names and
  - * htaccess names
  +/* 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.
*/
   test_dirname = palloc (r-pool, test_filename_len+1);
  -test_htaccess = NULL;
   for (i = 1; i = num_dirs; ++i) {
   core_dir_config *core_dir =
  (core_dir_config *)get_module_config(per_dir_defaults, core_module);
int

cvs commit: apache/src fnmatch.c fnmatch.h CHANGES Makefile.tmpl http_config.c http_config.h http_core.c http_core.h http_request.c

1997-08-06 Thread Dean Gaudet
/public_html, now it only matches things
  +   like /home/bob/public_html.  This mimics /bin/sh behaviour.
  + - It's possible now to use [] wildcarding in Directory, Files
  +   or Location.
  + - Regex Directorys are applied after all non-regex Directorys.
  +
  +[Dean Gaudet]
 
 *) Fix a bug introduced in 1.3a1 directory_walk regarding .htaccess files
and corrupted paths.  [Dean Gaudet]
  
  
  
  1.54  +13 -8 apache/src/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache/src/Makefile.tmpl,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- Makefile.tmpl 1997/07/31 20:56:24 1.53
  +++ Makefile.tmpl 1997/08/06 20:21:19 1.54
  @@ -11,7 +11,7 @@
   OBJS= alloc.o http_main.o http_core.o http_config.o http_request.o \
 http_log.o http_protocol.o rfc1413.o util.o util_script.o modules.o buff.o\
 md5c.o util_md5.o explain.o http_bprintf.o util_date.o util_snprintf.o\
  -  $(MODULES)
  +  fnmatch.o $(MODULES)
   
   .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $
  @@ -69,13 +69,15 @@
   buff.o: buff.c httpd.h conf.h alloc.h buff.h http_main.h
   dummy.o: dummy.c
   explain.o: explain.c explain.h
  +fnmatch.o: fnmatch.c
  +gnu-fnmatch.o: gnu-fnmatch.c fnmatch.h
   http_bprintf.o: http_bprintf.c httpd.h conf.h alloc.h buff.h
   http_config.o: http_config.c httpd.h conf.h alloc.h buff.h \
http_config.h http_core.h http_log.h http_request.h \
http_conf_globals.h explain.h
   http_core.o: http_core.c httpd.h conf.h alloc.h buff.h http_config.h \
http_core.h http_protocol.h http_conf_globals.h http_main.h \
  - http_log.h rfc1413.h util_md5.h md5.h scoreboard.h
  + http_log.h rfc1413.h util_md5.h md5.h scoreboard.h fnmatch.h
   http_log.o: http_log.c httpd.h conf.h alloc.h buff.h http_config.h \
http_core.h http_log.h
   http_main.o: http_main.c httpd.h conf.h alloc.h buff.h http_main.h \
  @@ -86,8 +88,8 @@
util_date.h
   http_request.o: http_request.c httpd.h conf.h alloc.h buff.h \
http_config.h http_request.h http_core.h http_protocol.h http_log.h \
  - http_main.h scoreboard.h
  -md5c.o: md5c.c md5.h
  + http_main.h scoreboard.h fnmatch.h
  +md5c.o: md5c.c conf.h md5.h
   mod_access.o: mod_access.c httpd.h conf.h alloc.h buff.h http_core.h \
http_config.h http_log.h http_request.h
   mod_actions.o: mod_actions.c httpd.h conf.h alloc.h buff.h \
  @@ -99,7 +101,7 @@
   mod_auth.o: mod_auth.c httpd.h conf.h alloc.h buff.h http_config.h \
http_core.h http_log.h http_protocol.h
   mod_auth_anon.o: mod_auth_anon.c httpd.h conf.h alloc.h buff.h \
  - http_config.h http_core.h http_log.h http_protocol.h
  + http_config.h http_core.h http_log.h http_protocol.h http_request.h
   mod_auth_db.o: mod_auth_db.c httpd.h conf.h alloc.h buff.h \
http_config.h http_core.h http_log.h http_protocol.h
   mod_auth_dbm.o: mod_auth_dbm.c httpd.h conf.h alloc.h buff.h \
  @@ -109,7 +111,7 @@
   mod_autoindex.o: mod_autoindex.c httpd.h conf.h alloc.h buff.h \
http_config.h http_core.h http_request.h http_protocol.h http_log.h \
http_main.h util_script.h
  -mod_setenvif.o: mod_setenvif.c httpd.h conf.h http_core.h alloc.h buff.h \
  +mod_browser.o: mod_browser.c httpd.h conf.h alloc.h buff.h \
http_config.h
   mod_cern_meta.o: mod_cern_meta.c httpd.h conf.h alloc.h buff.h \
http_config.h util_script.h http_log.h http_request.h
  @@ -143,13 +145,16 @@
http_config.h http_core.h
   mod_log_referer.o: mod_log_referer.c httpd.h conf.h alloc.h buff.h \
http_config.h
  -mod_mime.o: mod_mime.c httpd.h conf.h alloc.h buff.h http_config.h
  +mod_mime.o: mod_mime.c httpd.h conf.h alloc.h buff.h http_config.h \
  + mod_mime.h
   mod_mime_magic.o: mod_mime_magic.c httpd.h conf.h alloc.h buff.h \
http_config.h http_request.h http_core.h http_log.h http_protocol.h
   mod_negotiation.o: mod_negotiation.c httpd.h conf.h alloc.h buff.h \
http_config.h http_request.h http_core.h http_log.h util_script.h
   mod_rewrite.o: mod_rewrite.c httpd.h conf.h alloc.h buff.h \
http_config.h http_request.h http_core.h http_log.h mod_rewrite.h
  +mod_setenvif.o: mod_setenvif.c httpd.h conf.h alloc.h buff.h \
  + http_config.h http_core.h http_log.h
   mod_status.o: mod_status.c httpd.h conf.h alloc.h buff.h http_config.h \
http_core.h http_protocol.h http_main.h util_script.h scoreboard.h \
http_log.h
  @@ -161,7 +166,7 @@
   rfc1413.o: rfc1413.c httpd.h conf.h alloc.h buff.h http_log.h \
rfc1413.h http_main.h
   util.o: util.c httpd.h conf.h alloc.h buff.h http_conf_globals.h
  -util_date.o: util_date.c util_date.h
  +util_date.o: util_date.c conf.h util_date.h
   util_md5.o: util_md5.c httpd.h conf.h alloc.h buff.h util_md5.h md5.h
   util_script.o: util_script.c httpd.h conf.h alloc.h buff.h \
http_config.h http_conf_globals.h http_main.h http_log.h \
  
  
  
  1.72  +5 -0

cvs commit: apache/src CHANGES http_request.c

1997-08-06 Thread Dean Gaudet
dgaudet 97/08/06 13:32:22

  Modified:src   CHANGES http_request.c
  Log:
  Fix another long-standing bug in sub_req_lookup_file where it would
  happily skip past access checks on subdirectories looked up with
  relative paths.  (It's used by mod_dir, mod_negotiation,
  and mod_include.)
  
  Revision  ChangesPath
  1.388 +5 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.387
  retrieving revision 1.388
  diff -u -r1.387 -r1.388
  --- CHANGES   1997/08/06 20:21:19 1.387
  +++ CHANGES   1997/08/06 20:32:18 1.388
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3a2
   
  +  *) Fix another long-standing bug in sub_req_lookup_file where it would
  + happily skip past access checks on subdirectories looked up with
  + relative paths.  (It's used by mod_dir, mod_negotiation,
  + and mod_include.) [Dean Gaudet]
  +
 *) directory_walk optimization to reduce an O(N*M) loop to O(N+M) where
N is the number of Directory sections, and M is the number of
components in the filename of an object.
  
  
  
  1.71  +23 -14apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- http_request.c1997/08/06 20:21:25 1.70
  +++ http_request.c1997/08/06 20:32:19 1.71
  @@ -733,22 +733,31 @@
   
rnew-per_dir_config = r-per_dir_config;
   
  - if ((res = check_symlinks (rnew-filename, allow_options (rnew {
  - log_reason (Symbolic link not allowed, rnew-filename, rnew);
  - rnew-status = res;
  - return rnew;
  - }
  - /* do a file_walk, if it doesn't change the per_dir_config then
  -  * we know that we don't have to redo all the access checks */
  - if ((res = file_walk (rnew))) {
  - rnew-status = res;
  - return rnew;
  - }
  - if (rnew-per_dir_config == r-per_dir_config) {
  - if ((res = find_types (rnew)) || (res = run_fixups (rnew))) {
  + /* no matter what, if it's a subdirectory, we need to re-run
  +  * directory_walk */
  + if (S_ISDIR (rnew-finfo.st_mode)) {
  + res = directory_walk (rnew);
  + if (!res) {
  + res = file_walk (rnew);
  + }
  + } else {
  + if ((res = check_symlinks (rnew-filename, allow_options (rnew {
  + log_reason (Symbolic link not allowed, rnew-filename, rnew);
  + rnew-status = res;
  + return rnew;
  + }
  + /* do a file_walk, if it doesn't change the per_dir_config then
  +  * we know that we don't have to redo all the access checks */
  + if ((res = file_walk (rnew))) {
rnew-status = res;
  + return rnew;
  + }
  + if (rnew-per_dir_config == r-per_dir_config) {
  + if ((res = find_types (rnew)) || (res = run_fixups (rnew))) {
  + rnew-status = res;
  + }
  + return rnew;
}
  - return rnew;
}
   } else {
/* XXX: this should be set properly like it is in the same-dir case
  
  
  


cvs commit: apache/src CHANGES http_conf_globals.h http_config.c http_main.c http_protocol.c httpd.h

1997-08-05 Thread Dean Gaudet
dgaudet 97/08/04 23:02:47

  Modified:htdocs/manual  vhosts-in-depth.html
   src   CHANGES http_conf_globals.h http_config.c
http_main.c  http_protocol.c httpd.h
  Log:
  Hashed ip-vhosts, including some semantic changes to vhosts in general
  which should improve the vhost situation overall.
  
  Revision  ChangesPath
  1.13  +4 -0  apache/htdocs/manual/vhosts-in-depth.html
  
  Index: vhosts-in-depth.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/vhosts-in-depth.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- vhosts-in-depth.html  1997/07/06 17:18:57 1.12
  +++ vhosts-in-depth.html  1997/08/05 06:02:38 1.13
  @@ -186,6 +186,10 @@
   
   h3Vhost Matching/h3
   
  +
  +pstrongApache 1.3 differs from what is documented
  +here, and documentation still has to be written./strong
  +
   p
   The server determines which vhost to use for a request as follows:
   
  
  
  
  1.382 +14 -0 apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.381
  retrieving revision 1.382
  diff -u -r1.381 -r1.382
  --- CHANGES   1997/08/02 22:43:50 1.381
  +++ CHANGES   1997/08/05 06:02:39 1.382
  @@ -1,5 +1,19 @@
   Changes with Apache 1.3a2
   
  +  *) ip-based vhosts are stored and queried using a hashing function, which
  + has been shown to improve performance on servers with many ip-vhosts.
  + Some other changes had to be made to accomodate this:
  + - the * address for vhosts now behaves like _default_
  + - the matching process now is:
  + - match an ip-vhost directly via hash (possibly matches main
  + server)
  + - if that fails, just pretend it matched the main server
  + - if so far only the main server has been matched, perform
  + name-based lookups (ServerName, ServerAlias, ServerPath)
  + *only on name-based vhosts*
  + - if they fail, look for _default_ vhosts
  + [Dean Gaudet, Dave Hankins [EMAIL PROTECTED]]
  +
 *) dbmmanage overhaul:
- merge dbmmanage and dbmmanage.new functionality, remove dbmmanage.new 
- tie() to AnyDBM_File which will use one of DB_File, NDBM_File or
  
  
  
  1.17  +2 -1  apache/src/http_conf_globals.h
  
  Index: http_conf_globals.h
  ===
  RCS file: /export/home/cvs/apache/src/http_conf_globals.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- http_conf_globals.h   1997/08/03 20:29:18 1.16
  +++ http_conf_globals.h   1997/08/05 06:02:40 1.17
  @@ -87,8 +87,9 @@
   extern char server_root[MAX_STRING_LEN];
   extern char server_confname[MAX_STRING_LEN];
   
  +extern server_rec_chain *vhash_table[VHASH_TABLE_SIZE + VHASH_EXTRA_SLOP];
  +
   /* We want this to have the least chance of being correupted if there
* is some memory corruption, so we allocate it statically.
*/
   extern char coredump_dir[MAX_STRING_LEN];
  -
  
  
  
  1.70  +5 -0  apache/src/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apache/src/http_config.c,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- http_config.c 1997/08/03 20:29:18 1.69
  +++ http_config.c 1997/08/05 06:02:40 1.70
  @@ -1154,6 +1154,11 @@
   bind_address.s_addr = htonl(INADDR_ANY);
   listeners = NULL;
   listenbacklog = DEFAULT_LISTENBACKLOG;
  +
  +/* Global virtual host hash bucket pointers.  Init to null. */
  +memset (vhash_table, 0,
  + (VHASH_TABLE_SIZE + VHASH_EXTRA_SLOP) * sizeof (vhash_table[0]));
  +
   strncpy(coredump_dir, server_root, sizeof(coredump_dir)-1);
   coredump_dir[sizeof(coredump_dir)-1] = '\0';
   }
  
  
  
  1.197 +160 -39   apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.196
  retrieving revision 1.197
  diff -u -r1.196 -r1.197
  --- http_main.c   1997/08/04 09:21:16 1.196
  +++ http_main.c   1997/08/05 06:02:41 1.197
  @@ -191,6 +191,23 @@
   listen_rec *listeners;
   static listen_rec *head_listener;
   
  +/* A (n) bucket hash table, each entry has a pointer to a server rec and
  + * a pointer to the other entries in that bucket.  Each individual address,
  + * even for virtualhosts with multiple addresses, has an entry in this hash
  + * table.  There are extra buckets for _default_, and name-vhost entries.
  + *
  + * The main_server's addresses appear in the main part of this table

cvs commit: apache/src util_script.c

1997-08-05 Thread Dean Gaudet
dgaudet 97/08/04 23:33:27

  Modified:src   util_script.c
  Log:
  eliminate unused variable warning
  
  Revision  ChangesPath
  1.69  +2 -0  apache/src/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /export/home/cvs/apache/src/util_script.c,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- util_script.c 1997/08/04 21:10:16 1.68
  +++ util_script.c 1997/08/05 06:33:26 1.69
  @@ -306,7 +306,9 @@
 */

if (pa_req-filename) {
  +#ifdef WIN32
char buffer[HUGE_STRING_LEN];
  +#endif
char *pt = pstrcat (r-pool, pa_req-filename, pa_req-path_info,
NULL);
   #ifdef WIN32
  
  
  


cvs commit: apache/src CHANGES http_core.c

1997-08-05 Thread Dean Gaudet
dgaudet 97/08/04 23:45:01

  Modified:src   CHANGES http_core.c
  Log:
  When merging the main server's Directory and Location sections into
  a vhost, put the main server's first and the vhost's second.  Otherwise
  the vhost can't override the main server.
  
  Reviewed by:  Roy Fielding, Ralf S. Engelschall, Dean Gaudet
  PR:   717
  
  Revision  ChangesPath
  1.383 +4 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.382
  retrieving revision 1.383
  diff -u -r1.382 -r1.383
  --- CHANGES   1997/08/05 06:02:39 1.382
  +++ CHANGES   1997/08/05 06:44:58 1.383
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3a2
   
  +  *) When merging the main server's Directory and Location sections into
  + a vhost, put the main server's first and the vhost's second.  Otherwise
  + the vhost can't override the main server.  [Dean Gaudet] PR#717
  +
 *) ip-based vhosts are stored and queried using a hashing function, which
has been shown to improve performance on servers with many ip-vhosts.
Some other changes had to be made to accomodate this:
  
  
  
  1.107 +2 -2  apache/src/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache/src/http_core.c,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- http_core.c   1997/08/04 02:36:03 1.106
  +++ http_core.c   1997/08/05 06:44:59 1.107
  @@ -200,8 +200,8 @@
   *conf = *virt;
   if (!conf-access_name) conf-access_name = base-access_name;
   if (!conf-document_root) conf-document_root = base-document_root;
  -conf-sec = append_arrays (p, virt-sec, base-sec);
  -conf-sec_url = append_arrays (p, virt-sec_url, base-sec_url);
  +conf-sec = append_arrays (p, base-sec, virt-sec);
  +conf-sec_url = append_arrays (p, base-sec, virt-sec_url);
   
   return conf;
   }
  
  
  


cvs commit: apache/src CHANGES

1997-08-05 Thread Dean Gaudet
dgaudet 97/08/04 23:52:20

  Modified:src   CHANGES
  Log:
  Oops forgot to note this is fixed in 1.3a2 as well.
  
  Revision  ChangesPath
  1.384 +4 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.383
  retrieving revision 1.384
  diff -u -r1.383 -r1.384
  --- CHANGES   1997/08/05 06:44:58 1.383
  +++ CHANGES   1997/08/05 06:52:18 1.384
  @@ -4,6 +4,10 @@
a vhost, put the main server's first and the vhost's second.  Otherwise
the vhost can't override the main server.  [Dean Gaudet] PR#717
   
  +  *) The Directory code would merge and re-merge the same section after
  + a match was found, possibly causing problems with some modules.
  + [Dean Gaudet]
  +
 *) ip-based vhosts are stored and queried using a hashing function, which
has been shown to improve performance on servers with many ip-vhosts.
Some other changes had to be made to accomodate this:
  
  
  


cvs commit: apache/src http_core.c

1997-08-05 Thread Dean Gaudet
dgaudet 97/08/05 01:19:47

  Modified:src   http_core.c
  Log:
  Ugh, I suck.  I made this mistake once, you'd think I wouldn't make it
  again.  The append_arrays commit was messed up.
  
  Revision  ChangesPath
  1.108 +1 -1  apache/src/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache/src/http_core.c,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- http_core.c   1997/08/05 06:44:59 1.107
  +++ http_core.c   1997/08/05 08:19:46 1.108
  @@ -201,7 +201,7 @@
   if (!conf-access_name) conf-access_name = base-access_name;
   if (!conf-document_root) conf-document_root = base-document_root;
   conf-sec = append_arrays (p, base-sec, virt-sec);
  -conf-sec_url = append_arrays (p, base-sec, virt-sec_url);
  +conf-sec_url = append_arrays (p, base-sec_url, virt-sec_url);
   
   return conf;
   }
  
  
  


cvs commit: apache/src http_core.c

1997-08-05 Thread Dean Gaudet
dgaudet 97/08/05 01:20:55

  Modified:src   Tag: APACHE_1_2_X  http_core.c
  Log:
  Yep I managed to post it screwed up ... and probably because I wrote
  so much with the patch to PR#717 everyone agreed with the concept without
  reviewing the code!
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.81.2.8  +1 -1  apache/src/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache/src/http_core.c,v
  retrieving revision 1.81.2.7
  retrieving revision 1.81.2.8
  diff -u -r1.81.2.7 -r1.81.2.8
  --- http_core.c   1997/08/04 16:05:00 1.81.2.7
  +++ http_core.c   1997/08/05 08:20:54 1.81.2.8
  @@ -201,7 +201,7 @@
   if (!conf-access_name) conf-access_name = base-access_name;
   if (!conf-document_root) conf-document_root = base-document_root;
   conf-sec = append_arrays (p, base-sec, virt-sec);
  -conf-sec_url = append_arrays (p, base-sec, virt-sec_url);
  +conf-sec_url = append_arrays (p, base-sec_url, virt-sec_url);
   
   return conf;
   }
  
  
  


cvs commit: apache/src http_protocol.c

1997-08-05 Thread Dean Gaudet
dgaudet 97/08/05 01:24:34

  Modified:src   http_protocol.c
  Log:
  I'm on a roll tonight.  Fix a bug with HTTP/1.1 and the recent hashed
  ip-vhosts commit.
  
  Revision  ChangesPath
  1.151 +3 -0  apache/src/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apache/src/http_protocol.c,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- http_protocol.c   1997/08/05 06:02:42 1.150
  +++ http_protocol.c   1997/08/05 08:24:33 1.151
  @@ -849,6 +849,9 @@
if (r-server-is_virtual == 0) {
check_default_server (r);
}
  +} else if (!r-hostname) {
  + /* must set this for HTTP/1.1 support */
  + r-hostname = table_get (r-headers_in, Host);
   }
   /* we have finished the search for a vhost */
   
  
  
  


cvs commit: apache/src http_protocol.c

1997-08-03 Thread Dean Gaudet
dgaudet 97/08/03 19:55:12

  Modified:src   http_protocol.c
  Log:
  Change set_last_modified to something that Roy and I are both happy with.
  
  Reviewed by:  Roy Fielding
  
  Revision  ChangesPath
  1.149 +9 -3  apache/src/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apache/src/http_protocol.c,v
  retrieving revision 1.148
  retrieving revision 1.149
  diff -u -r1.148 -r1.149
  --- http_protocol.c   1997/08/03 21:35:58 1.148
  +++ http_protocol.c   1997/08/04 02:55:11 1.149
  @@ -350,10 +350,16 @@
   {
   char *etag, weak_etag[MAX_STRING_LEN];
   char *if_match, *if_modified_since, *if_unmodified, *if_nonematch;
  -time_t now = time(NULL);
  +time_t now;
   
  -if (now  0)
  - now = r-request_time;
  +/* For all static responses, it's almost certain that the file was
  + * last modified before the beginning of the request.  So there's
  + * no reason to call time(NULL) again.  But if the response has been
  + * created on demand, then it might be newer than the time the request
  + * started.  In this event we really have to call time(NULL) again
  + * so that we can give the clients the most accurate Last-Modified.
  + */
  +now = (mtime = r-request_time) ? r-request_time : time(NULL);
   
   table_set(r-headers_out, Last-Modified,
 gm_timestr_822(r-pool, (mtime  now) ? now : mtime));
  
  
  


cvs commit: apache/src http_request.c

1997-08-03 Thread Dean Gaudet
dgaudet 97/08/03 22:14:26

  Modified:src   http_request.c
  Log:
  make it a little more obvious that this_conf is only used inside the
  inner loop.
  
  Revision  ChangesPath
  1.68  +2 -1  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- http_request.c1997/08/01 08:01:21 1.67
  +++ http_request.c1997/08/04 05:14:26 1.68
  @@ -349,7 +349,7 @@
   core_dir_config *core_dir =
  (core_dir_config *)get_module_config(per_dir_defaults, core_module);
int overrides_here;
  -void *this_conf, *htaccess_conf = NULL;
  +void *htaccess_conf = NULL;
char *test_dirname_tail;
int j;
   
  @@ -373,6 +373,7 @@
void *entry_config = sec[j];
core_dir_config *entry_core;
char *entry_dir;
  + void *this_conf;
   
if (!entry_config) continue;

  
  
  


cvs commit: apache/src http_main.c CHANGES

1997-08-02 Thread Dean Gaudet
 @@
 * connections to close before receiving a response because
 * of network latencies and server timeouts.
 */
  - signal (SIGUSR1, just_die);
  + usr1_just_die = 1;
  + signal (SIGUSR1, usr1_handler);
   }
   
   /*
  @@ -2520,6 +2533,7 @@
   #ifndef MAX_SPAWN_RATE
   #define MAX_SPAWN_RATE   (32)
   #endif
  +static int hold_off_on_exponential_spawning;
   
   static void perform_idle_server_maintenance (void)
   {
  @@ -2596,9 +2610,11 @@
++i;
}
/* the next time around we want to spawn twice as many if this
  -  * wasn't good enough
  +  * wasn't good enough, but not if we've just done a graceful
 */
  - if (idle_spawn_rate  MAX_SPAWN_RATE) {
  + if (hold_off_on_exponential_spawning) {
  + --hold_off_on_exponential_spawning;
  + } else if (idle_spawn_rate  MAX_SPAWN_RATE) {
idle_spawn_rate *= 2;
}
}
  @@ -2680,6 +2696,10 @@
if (!is_graceful) {
startup_children (remaining_children_to_start);
remaining_children_to_start = 0;
  + } else {
  + /* give the system some time to recover before kicking into
  +  * exponential mode */
  + hold_off_on_exponential_spawning = 10;
}
   
log_error (Server configured -- resuming normal operations,
  
  
  
  1.380 +2 -2  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.379
  retrieving revision 1.380
  diff -u -r1.379 -r1.380
  --- CHANGES   1997/08/02 00:58:24 1.379
  +++ CHANGES   1997/08/02 06:49:33 1.380
  @@ -6,8 +6,8 @@
was a bug where the client socket was being close()d twice due a still
registered cleanup.  [Dean Gaudet]
   
  -  *) A few cleanups were made to reduce unneeded time() and getpid()
  - calls.  [Dean Gaudet]
  +  *) A few cleanups were made to reduce time(), getpid(), and signal() calls.
  + [Dean Gaudet]
   
 *) PORT: AIX = 4.2 requires -lm due to libc changes.
[Jason Venner [EMAIL PROTECTED]] PR#667
  
  
  


cvs commit: apache/src mod_setenvif.c

1997-08-02 Thread Dean Gaudet
dgaudet 97/08/02 00:12:50

  Modified:src   mod_setenvif.c
  Log:
  These error messages look like debugging stuff to me... and they're
  spamming my logs.
  
  Revision  ChangesPath
  1.3   +4 -0  apache/src/mod_setenvif.c
  
  Index: mod_setenvif.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_setenvif.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_setenvif.c1997/08/01 03:32:02 1.2
  +++ mod_setenvif.c1997/08/02 07:12:49 1.3
  @@ -314,13 +314,17 @@
(sconf-zero_means_unset  (!strcmp(elts[j].val, 0 {
   
table_unset(r-subprocess_env, elts[j].key);
  +#ifdef SETENV_DEBUG
log_printf(r-server, mod_setenvif: unsetting %s,
   elts[j].key);
  +#endif
}
else {
table_set(r-subprocess_env, elts[j].key, elts[j].val);
  +#ifdef SETENV_DEBUG
log_printf(r-server, mod_setenvif: setting %s to %s,
   elts[j].key, elts[j].val);
  +#endif
}
}
}
  
  
  


cvs commit: apache/src mod_setenvif.c

1997-08-02 Thread Dean Gaudet
dgaudet 97/08/02 01:10:28

  Modified:src   mod_setenvif.c
  Log:
  clean up a 64-bit warning
  
  Revision  ChangesPath
  1.4   +1 -1  apache/src/mod_setenvif.c
  
  Index: mod_setenvif.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_setenvif.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_setenvif.c1997/08/02 07:12:49 1.3
  +++ mod_setenvif.c1997/08/02 08:10:28 1.4
  @@ -161,7 +161,7 @@
(sei_entry *)sconf-conditionals-elts;
   char *var;
   int i;
  -int cflags = (int)cmd-info;
  +int cflags = (int)(long)cmd-info;
   char *error;
   int beenhere = 0;
   
  
  
  


cvs commit: apache/src/modules/proxy proxy_connect.c proxy_ftp.c proxy_http.c

1997-08-01 Thread Dean Gaudet
dgaudet 97/08/01 17:58:36

  Modified:src   CHANGES alloc.c alloc.h buff.c http_main.c
http_protocol.c  mod_expires.c mod_usertrack.c
rfc1413.c
   src/modules/proxy  proxy_connect.c proxy_ftp.c proxy_http.c
  Log:
  Added psocket() which is a pool form of socket(), various places within
  the proxy weren't properly blocking alarms while registering the cleanup
  for its sockets.  bclose() now uses pclose() and pclosesocket().  There
  was a bug where the client socket was being close()d twice due a still
  registered cleanup.
  
  A few cleanups were made to reduce unneeded time() and getpid() calls.
  
  Revision  ChangesPath
  1.379 +9 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.378
  retrieving revision 1.379
  diff -u -r1.378 -r1.379
  --- CHANGES   1997/08/01 10:24:39 1.378
  +++ CHANGES   1997/08/02 00:58:24 1.379
  @@ -1,5 +1,14 @@
   Changes with Apache 1.3a2
   
  +  *) Added psocket() which is a pool form of socket(), various places within
  + the proxy weren't properly blocking alarms while registering the cleanup
  + for its sockets.  bclose() now uses pclose() and pclosesocket().  There
  + was a bug where the client socket was being close()d twice due a still
  + registered cleanup.  [Dean Gaudet]
  +
  +  *) A few cleanups were made to reduce unneeded time() and getpid()
  + calls.  [Dean Gaudet]
  +
 *) PORT: AIX = 4.2 requires -lm due to libc changes.
[Jason Venner [EMAIL PROTECTED]] PR#667
   
  
  
  
  1.46  +17 -0 apache/src/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /export/home/cvs/apache/src/alloc.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- alloc.c   1997/07/25 09:41:29 1.45
  +++ alloc.c   1997/08/02 00:58:25 1.46
  @@ -985,6 +985,23 @@
   kill_cleanup(p,(void *)(long)sock,socket_cleanup);
   }
   
  +API_EXPORT(int) psocket (pool *p, int domain, int type, int protocol)
  +{
  +int fd;
  +
  +block_alarms();
  +fd = socket (domain, type, protocol);
  +if (fd == -1) {
  + int save_errno = errno;
  + unblock_alarms();
  + errno = save_errno;
  + return -1;
  +}
  +note_cleanups_for_socket (p, fd);
  +unblock_alarms();
  +return fd;
  +}
  +
   API_EXPORT(int) pclosesocket(pool *a, int sock)
   {
 int res;
  
  
  
  1.32  +1 -0  apache/src/alloc.h
  
  Index: alloc.h
  ===
  RCS file: /export/home/cvs/apache/src/alloc.h,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- alloc.h   1997/07/21 05:53:41 1.31
  +++ alloc.h   1997/08/02 00:58:26 1.32
  @@ -220,6 +220,7 @@
   
   API_EXPORT(void) note_cleanups_for_socket (pool *, int);
   API_EXPORT(void) kill_cleanups_for_socket (pool *p, int sock);
  +API_EXPORT(int) psocket (pool *p, int, int, int);
   API_EXPORT(int) pclosesocket(pool *a, int sock);
   
   API_EXPORT(regex_t *) pregcomp (pool *p, const char *pattern, int cflags);
  
  
  
  1.42  +4 -4  apache/src/buff.c
  
  Index: buff.c
  ===
  RCS file: /export/home/cvs/apache/src/buff.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- buff.c1997/08/01 04:07:57 1.41
  +++ buff.c1997/08/02 00:58:26 1.42
  @@ -1175,17 +1175,17 @@
   else rc1 = 0;
   #ifdef WIN32
   if (fb-flags  B_SOCKET) {
  - rc2 = closesocket(fb-fd);
  + rc2 = pclosesocket(fb-pool, fb-fd);
if (fb-fd_in != fb-fd) {
  - rc3 = closesocket(fb-fd_in);
  + rc3 = pclosesocket(fb-pool, fb-fd_in);
} else {
rc3 = 0;
}
   } else {
   #endif
  - rc2 = close(fb-fd);
  + rc2 = pclosef(fb-pool, fb-fd);
if (fb-fd_in != fb-fd) {
  - rc3 = close(fb-fd_in);
  + rc3 = pclosef(fb-pool, fb-fd_in);
} else {
rc3 = 0;
}
  
  
  
  1.192 +18 -4 apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.191
  retrieving revision 1.192
  diff -u -r1.191 -r1.192
  --- http_main.c   1997/07/29 06:57:19 1.191
  +++ http_main.c   1997/08/02 00:58:27 1.192
  @@ -219,6 +219,8 @@
   pool *pconf; /* Pool for config stuff */
   pool *ptrans;/* Pool for per-transaction stuff */
   
  +int APACHE_TLS my_pid;   /* it seems silly to call getpid all 
the time */
  +
   /* small utility macros to make things easier to read */
   
   #ifdef

cvs commit: apache/src http_core.c

1997-07-31 Thread Dean Gaudet
dgaudet 97/07/31 00:51:36

  Modified:src   http_core.c
  Log:
  Fix a null deref, and improper status update in the double reverse code.
  
  Revision  ChangesPath
  1.103 +30 -16apache/src/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache/src/http_core.c,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- http_core.c   1997/07/30 18:41:51 1.102
  +++ http_core.c   1997/07/31 07:51:34 1.103
  @@ -335,6 +335,11 @@
/* already done */
return;
   }
  +if (conn-remote_host == NULL || conn-remote_host[0] == '\0') {
  + /* single reverse failed, so don't bother */
  + conn-double_reverse = -1;
  + return;
  +}
   hptr = gethostbyname(conn-remote_host);
   if (hptr) {
for (haddr = hptr-h_addr_list; *haddr; haddr++) {
  @@ -355,20 +360,28 @@
   {
   struct in_addr *iaddr;
   struct hostent *hptr;
  -core_dir_config *dir_conf = NULL;
  +int hostname_lookups;
  +#ifdef STATUS
  +int old_stat = SERVER_UNKNOWN;
  +#endif
   
  -/* If we haven't checked the host name, and we want to */
  -if (dir_config) 
  - dir_conf = (core_dir_config *)get_module_config(dir_config, 
core_module);
  +/* If we haven't checked the host name, and we want to */
  +if (dir_config) {
  + hostname_lookups =
  + ((core_dir_config *)get_module_config(dir_config, core_module))
  + -hostname_lookups;
  +} else {
  + /* the default */
  + hostname_lookups = HOSTNAME_LOOKUP_OFF;
  +}
   
  -   if ((!dir_conf) || (type != REMOTE_NOLOOKUP  conn-remote_host == NULL
  +if (type != REMOTE_NOLOOKUP
  +  conn-remote_host == NULL
 (type == REMOTE_DOUBLE_REV
  - || dir_conf-hostname_lookups != HOSTNAME_LOOKUP_OFF)))
  -{
  + || hostname_lookups != HOSTNAME_LOOKUP_OFF)) {
   #ifdef STATUS
  - int old_stat = update_child_status(conn-child_num,
  - SERVER_BUSY_DNS,
  - (request_rec*)NULL);
  + old_stat = update_child_status(conn-child_num, SERVER_BUSY_DNS,
  + (request_rec*)NULL);
   #endif /* STATUS */
iaddr = (conn-remote_addr.sin_addr);
hptr = gethostbyaddr((char *)iaddr, sizeof(struct in_addr), AF_INET);
  @@ -376,19 +389,15 @@
conn-remote_host = pstrdup(conn-pool, (void *)hptr-h_name);
str_tolower (conn-remote_host);
   
  - if (dir_conf
  -  dir_conf-hostname_lookups == HOSTNAME_LOOKUP_DOUBLE) {
  + if (hostname_lookups == HOSTNAME_LOOKUP_DOUBLE) {
do_double_reverse (conn);
if (conn-double_reverse != 1) {
conn-remote_host = NULL;
}
}
}
  -/* if failed, set it to the NULL string to indicate error */
  + /* if failed, set it to the NULL string to indicate error */
if (conn-remote_host == NULL) conn-remote_host = ;
  -#ifdef STATUS
  - (void)update_child_status(conn-child_num,old_stat,(request_rec*)NULL);
  -#endif /* STATUS */
   }
   if (type == REMOTE_DOUBLE_REV) {
do_double_reverse (conn);
  @@ -396,6 +405,11 @@
return NULL;
}
   }
  +#ifdef STATUS
  +if (old_stat != SERVER_UNKNOWN) {
  + (void)update_child_status(conn-child_num,old_stat,(request_rec*)NULL);
  +}
  +#endif /* STATUS */
   
   /*
* Return the desired information; either the remote DNS name, if found,
  
  
  


cvs commit: apache/src buff.c

1997-07-31 Thread Dean Gaudet
dgaudet 97/07/31 02:10:30

  Modified:src   buff.c
  Log:
  Improve the heuristic for deciding when to use writev() vs. when to
  copy into the buffer.  No sense copying if the copy would fill
  the buffer, might as well writev and start a fresh buffer.
  
  Revision  ChangesPath
  1.40  +1 -1  apache/src/buff.c
  
  Index: buff.c
  ===
  RCS file: /export/home/cvs/apache/src/buff.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- buff.c1997/07/29 06:52:26 1.39
  +++ buff.c1997/07/31 09:10:29 1.40
  @@ -1005,7 +1005,7 @@
* Detect case where we're asked to write a large buffer, and combine our
* current buffer with it in a single writev()
*/
  -if (fb-outcnt  0  nbyte = fb-bufsiz) {
  +if (fb-outcnt  0  nbyte + fb-outcnt = fb-bufsiz) {
return large_write (fb, buf, nbyte);
   }
   #endif
  
  
  


cvs commit: apache/src CHANGES

1997-07-30 Thread Dean Gaudet
dgaudet 97/07/30 11:45:03

  Modified:src   CHANGES
  Log:
  Clear up the CHANGES wording for hostnamelookups double a little bit.
  
  Revision  ChangesPath
  1.373 +4 -2  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.372
  retrieving revision 1.373
  diff -u -r1.372 -r1.373
  --- CHANGES   1997/07/30 18:41:50 1.372
  +++ CHANGES   1997/07/30 18:44:59 1.373
  @@ -1,7 +1,9 @@
   Changes with Apache 1.3a2
   
  -  *) HostnameLookups double forces double-reverse DNS to succeed.
  - The old define MAXIMUM_DNS has been deprecated.  [Dean Gaudet]
  +  *) HostnameLookups double forces double-reverse DNS to succeed in
  + order for remote_host to be set (for logging, or for the env var
  + REMOTE_HOST).  The old define MAXIMUM_DNS has been deprecated.
  + [Dean Gaudet]
   
 *) mod_access overhaul:
- Now understands network/netmask syntax (i.e.  10.1.0.0/255.255.0.0)
  
  
  


cvs commit: apache/htdocs/manual/mod directives.html mod_info.html

1997-07-30 Thread Dean Gaudet
dgaudet 97/07/30 13:08:20

  Modified:htdocs/manual  new_features_1_3.html
   htdocs/manual/mod  directives.html mod_info.html
  Log:
  Document the AddModuleInfo patch.
  
  Submitted by: Lou D. Langholtz [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.12  +3 -0  apache/htdocs/manual/new_features_1_3.html
  
  Index: new_features_1_3.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/new_features_1_3.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- new_features_1_3.html 1997/07/25 11:03:58 1.11
  +++ new_features_1_3.html 1997/07/30 20:08:14 1.12
  @@ -149,6 +149,9 @@
   and stronga href=mod/mod_proxy.html#proxydomainProxyDomain/a
   /strong directives added to proxy, useful for intranets.
   
  +listronga href=mod/mod_info.html#addmoduleinfoAddModuleInfo/a
  +directive added to a href=mod/mod_info.htmlmod_info/a/strongbr
  +Allows additional information to be listed along with a specified module.
   /ul
   
   !--#include virtual=footer.html --
  
  
  
  1.28  +1 -0  apache/htdocs/manual/mod/directives.html
  
  Index: directives.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/mod/directives.html,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- directives.html   1997/07/21 21:26:55 1.27
  +++ directives.html   1997/07/30 20:08:16 1.28
  @@ -30,6 +30,7 @@
   liA HREF=mod_autoindex.html#addiconbytypeAddIconByType/A
   liA HREF=mod_mime.html#addlanguageAddLanguage/A
   liA HREF=core.html#addmoduleAddModule/A
  +liA HREF=mod_info.html#addmoduleinfoAddModuleInfo/A
   liA HREF=mod_mime.html#addtypeAddType/A
   liA HREF=mod_log_agent.html#agentlogAgentLog/A
   liA HREF=mod_alias.html#aliasAlias/A
  
  
  
  1.5   +25 -0 apache/htdocs/manual/mod/mod_info.html
  
  Index: mod_info.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/mod/mod_info.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_info.html 1997/06/04 16:14:21 1.4
  +++ mod_info.html 1997/07/30 20:08:17 1.5
  @@ -27,6 +27,11 @@
   Module info_module   mod_info.o
   /PRE
   
  +H2Directives/H2
  +UL
  +LIA HREF=#addmoduleinfoAddModuleInfo/A
  +/UL
  +
   HR
   P
   To configure it, add the following to your codeaccess.conf/code file.
  @@ -68,6 +73,26 @@
 /P
/STRONG
   /BLOCKQUOTE
  +
  +HR
  +
  +H2A NAME=addmoduleinfoAddModuleInfo/A/H2
  +STRONGSyntax:/STRONG AddModuleInfo EMmodule-name string/EMBR
  +STRONGContext:/STRONG server config, virtual hostBR
  +STRONGStatus:/STRONG baseBR
  +STRONGModule:/STRONG mod_browserBR
  +STRONGCompatibility:/STRONG Apache 1.3 and aboveP
  +
  +This allows the content of EMstring/EM to be shown as
  +HTML interpreted,
  +STRONGAdditional Information/STRONG for the module EMmodule-name/EM.
  +Example:
  +BLOCKQUOTE
  +PRE
  +AddModuleInfo mod_auth.c 'See lt;A 
HREF=http://www.apache.org/docs/mod/mod_auth.htmlgt;http://www.apache.org/docs/mod/mod_auth.htmllt;/Agt;'
  +/PRE
  +/BLOCKQUOTE
  +
   !--#include virtual=footer.html --
   /BODY
   /HTML
  
  
  


cvs commit: apache/src CHANGES buff.c

1997-07-29 Thread Dean Gaudet
dgaudet 97/07/28 23:52:28

  Modified:src   CHANGES buff.c
  Log:
  Combine large bwrite() with partial buffer by using writev() to avoid any
  mem-mem copies.  Fix a bug where if bflush/bwrite had a write failure
  while chunking they won't properly start the next chunk.
  
  Revision  ChangesPath
  1.371 +10 -0 apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.370
  retrieving revision 1.371
  diff -u -r1.370 -r1.371
  --- CHANGES   1997/07/28 18:22:40 1.370
  +++ CHANGES   1997/07/29 06:52:25 1.371
  @@ -1,5 +1,15 @@
   Changes with Apache 1.3a2
   
  +  *) When a large bwrite() occurs (larger than the internal buffer size),
  + while there is already something in the buffer, apache will combine
  + the large write and the buffer into a single writev().  (This is
  + in anticipation of using mmap() for reading files.)
  + [Dean Gaudet]
  +
  +  *) In obscure cases where a partial socket write occured while chunking,
  + Apache would omit the chunk header/footer on the next block.
  + [Dean Gaudet]
  +
 *) API: Added child_exit function to module structure.  This is called
once per heavy-weight process just before a server child exit()'s 
e.g. when max_requests_per_child is reached, etc.
  
  
  
  1.39  +103 -39   apache/src/buff.c
  
  Index: buff.c
  ===
  RCS file: /export/home/cvs/apache/src/buff.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- buff.c1997/07/24 04:23:57 1.38
  +++ buff.c1997/07/29 06:52:26 1.39
  @@ -840,6 +840,45 @@
   }
   
   
  +#ifndef NO_WRITEV
  +/* similar to previous, but uses writev.  Note that it modifies vec.
  + * return 0 if successful, -1 otherwise.
  + */
  +static int writev_it_all (BUFF *fb, struct iovec *vec, int nvec)
  +{
  +int i, rv;
  +
  +/* while it's nice an easy to build the vector and crud, it's painful
  + * to deal with a partial writev()
  + */
  +for( i = 0; i  nvec; ) {
  + do rv = writev( fb-fd, vec[i], nvec - i );
  + while (rv == -1  errno == EINTR  !(fb-flags  B_EOUT));
  + if (rv == -1)
  + return -1;
  + /* recalculate vec to deal with partial writes */
  + while (rv  0) {
  + if (rv  vec[i].iov_len) {
  + vec[i].iov_base = (char *)vec[i].iov_base + rv;
  + vec[i].iov_len -= rv;
  + rv = 0;
  + if (vec[i].iov_len == 0) {
  + ++i;
  + }
  + } else {
  + rv -= vec[i].iov_len;
  + ++i;
  + }
  + }
  + if (fb-flags  B_EOUT)
  + return -1;
  +}
  +/* if we got here, we wrote it all */
  +return 0;
  +}
  +#endif
  +
  +
   /*
* A hook to write() that deals with chunking. This is really a protocol-
* level issue, but we deal with it here because it's simpler; this is
  @@ -852,7 +891,6 @@
   char chunksize[16];  /* Big enough for practically anything */
   #ifndef NO_WRITEV
   struct iovec vec[3];
  -int i, rv;
   #endif
   
   if (fb-flags  (B_WRERR|B_EOUT))
  @@ -874,9 +912,6 @@
return -1;
   return nbyte;
   #else
  -
  -#define NVEC (sizeof(vec)/sizeof(vec[0]))
  -
   vec[0].iov_base = chunksize;
   vec[0].iov_len = ap_snprintf(chunksize, sizeof(chunksize), %x\015\012,
nbyte);
  @@ -884,38 +919,51 @@
   vec[1].iov_len = nbyte;
   vec[2].iov_base = \r\n;
   vec[2].iov_len = 2;
  -/* while it's nice an easy to build the vector and crud, it's painful
  - * to deal with a partial writev()
  - */
  -for( i = 0; i  NVEC; ) {
  - do rv = writev( fb-fd, vec[i], NVEC - i );
  - while (rv == -1  errno == EINTR  !(fb-flags  B_EOUT));
  - if (rv == -1)
  - return -1;
  - /* recalculate vec to deal with partial writes */
  - while (rv  0) {
  - if( rv = vec[i].iov_len ) {
  - vec[i].iov_base = (char *)vec[i].iov_base + rv;
  - vec[i].iov_len -= rv;
  - rv = 0;
  - if( vec[i].iov_len == 0 ) {
  - ++i;
  - }
  - } else {
  - rv -= vec[i].iov_len;
  - ++i;
  - }
  - }
  - if (fb-flags  B_EOUT)
  - return -1;
  -}
  -/* if we got here, we wrote it all */
  -return nbyte;
  -#undef NVEC
  +
  +return writev_it_all (fb, vec, (sizeof(vec)/sizeof(vec[0]))) ? -1 : 
nbyte;
   #endif
   }
   
   
  +#ifndef NO_WRITEV
  +/*
  + * Used to combine the contents of the fb buffer, and a large buffer
  + * passed in.
  + */
  +static int large_write (BUFF *fb, const void *buf, int nbyte)
  +{
  +struct iovec vec[4];
  +int nvec;
  +char chunksize[16];
  +
  +nvec = 0

cvs commit: apache/src http_main.c

1997-07-29 Thread Dean Gaudet
dgaudet 97/07/28 23:57:21

  Modified:src   http_main.c
  Log:
  Defensive coding -- protect against a possible future where while just_die()
  is in effect something might be muddling in alloc.c's internal structure,
  and one of the child_exit handlers may want to muddle there too.
  
  Revision  ChangesPath
  1.191 +19 -8 apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.190
  retrieving revision 1.191
  diff -u -r1.190 -r1.191
  --- http_main.c   1997/07/28 18:22:47 1.190
  +++ http_main.c   1997/07/29 06:57:19 1.191
  @@ -216,6 +216,9 @@
   
   int one_process = 0;
   
  +pool *pconf; /* Pool for config stuff */
  +pool *ptrans;/* Pool for per-transaction stuff */
  +
   /* small utility macros to make things easier to read */
   
   #ifdef WIN32
  @@ -375,6 +378,7 @@
   static APACHE_TLS const char *timeout_name = NULL;
   static APACHE_TLS int alarms_blocked = 0;
   static APACHE_TLS int alarm_pending = 0;
  +static APACHE_TLS int exit_after_unblock = 0;
   
   #ifndef NO_USE_SIGACTION
   /*
  @@ -469,9 +473,14 @@
   
   API_EXPORT(void) unblock_alarms() {
   --alarms_blocked;
  -if (alarms_blocked == 0  alarm_pending) {
  - alarm_pending = 0;
  - timeout(0);
  +if (alarms_blocked == 0) {
  + if (exit_after_unblock) {
  + child_exit_modules(pconf, server_conf);
  + }
  + if (alarm_pending) {
  + alarm_pending = 0;
  + timeout(0);
  + }
   }
   }
   
  @@ -1475,15 +1484,17 @@
   
   /*
* Connection structures and accounting...
  - * Should these be global?  Only to this file, at least...
*/
   
  -pool *pconf; /* Pool for config stuff */
  -pool *ptrans;/* Pool for per-transaction stuff */
  -
   void just_die(int sig)   /* SIGHUP to child process??? */
   {
  -child_exit_modules(pconf, server_conf);
  +/* if alarms are blocked we have to wait to die otherwise we might
  + * end up with corruption in alloc.c's internal structures */
  +if (alarms_blocked) {
  + exit_after_unblock = 1;
  +} else {
  + child_exit_modules(pconf, server_conf);
  +}
   }
   
   static int deferred_die;
  
  
  


cvs commit: apache/src CHANGES mod_include.c

1997-07-28 Thread Dean Gaudet
dgaudet 97/07/28 01:46:45

  Modified:src   CHANGES mod_include.c
  Log:
  fixed unused handle_endif
  
  Submitted by: Howard Fear
  Reviewed by:  Dean Gaudet, Marc Slemko
  
  Revision  ChangesPath
  1.369 +4 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.368
  retrieving revision 1.369
  diff -u -r1.368 -r1.369
  --- CHANGES   1997/07/27 02:38:03 1.368
  +++ CHANGES   1997/07/28 08:46:41 1.369
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3a2
   
  +  *) mod_include cleanup showed that handle_else was being used to handle
  + endif.  It didn't cause problems, but it was cleaned up too.
  + [Howard Fear]
  +
 *) mod_cern_meta would attempt to find meta files for the directory itself
in some cases, but not in others.  It now avoids it in all cases.
[Dean Gaudet]
  
  
  
  1.45  +2 -2  apache/src/mod_include.c
  
  Index: mod_include.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_include.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mod_include.c 1997/07/27 01:43:26 1.44
  +++ mod_include.c 1997/07/28 08:46:42 1.45
  @@ -1728,6 +1728,7 @@
   #ifdef DEBUG_INCLUDE
   rvputs(r,  endif conditional_status=\, *conditional_status ? 1 : 
0, \\n, NULL);
   #endif
  +*printing = 1;
   *conditional_status = 1;
   return 0;
   } else {
  @@ -1843,8 +1844,7 @@
   continue;
   } else if (!strcmp(directive, endif)) {
   if (!if_nesting) {
  -ret = handle_else(f, r, error, conditional_status, 
printing);
  -printing = 1;
  +ret = handle_endif(f, r, error, conditional_status, 
printing);
   } else {
   if_nesting--;
   }
  
  
  


cvs commit: apache/src http_main.c

1997-07-28 Thread Dean Gaudet
dgaudet 97/07/28 02:59:23

  Modified:src   http_main.c
  Log:
  Solaris whines about the const struct sockaddr_in.  Silly solaris.
  
  Revision  ChangesPath
  1.188 +1 -1  apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.187
  retrieving revision 1.188
  diff -u -r1.187 -r1.188
  --- http_main.c   1997/07/24 04:35:47 1.187
  +++ http_main.c   1997/07/28 09:59:21 1.188
  @@ -1861,7 +1861,7 @@
   /* MPE requires CAP=PM and GETPRIVMODE to bind to ports less than 1024 */
   if (ntohs(server-sin_port)  1024) GETPRIVMODE();
   #endif
  -if(bind(s, (const struct sockaddr *)server,sizeof(struct sockaddr_in)) 
== -1)
  +if(bind(s, (struct sockaddr *)server,sizeof(struct sockaddr_in)) == -1)
   {
   perror(bind);
   #ifdef MPE
  
  
  


cvs commit: apache/src http_main.c

1997-07-28 Thread Dean Gaudet
dgaudet 97/07/28 04:02:32

  Modified:src   http_main.c
  Log:
  Log a failed listen... perhaps it will help with diagnosing the bizarre
  accept() error loops.
  
  Revision  ChangesPath
  1.189 +10 -3 apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.188
  retrieving revision 1.189
  diff -u -r1.188 -r1.189
  --- http_main.c   1997/07/28 09:59:21 1.188
  +++ http_main.c   1997/07/28 11:02:31 1.189
  @@ -1948,7 +1948,12 @@
   sock_bind (s, server);
   #endif
   
  -listen(s, listenbacklog);
  +if (listen(s, listenbacklog) == -1) {
  + log_unixerr (listen, NULL, unable to listen for connections,
  + server_conf);
  + close (s);
  + return -1;
  +}
   return s;
   }
   
  @@ -2033,8 +2038,10 @@
if (fd  0) {
fd = make_sock (p, lr-local_addr);
}
  - FD_SET (fd, listenfds);
  - if (fd  listenmaxfd) listenmaxfd = fd;
  + if (fd = 0) {
  + FD_SET (fd, listenfds);
  + if (fd  listenmaxfd) listenmaxfd = fd;
  + }
lr-fd = fd;
if (lr-next == NULL) break;
lr = lr-next;
  
  
  


cvs commit: apache/htdocs/manual/mod mod_proxy.html

1997-07-27 Thread Dean Gaudet
dgaudet 97/07/27 10:16:19

  Modified:htdocs/manual/mod  Tag: APACHE_1_2_X  mod_proxy.html
  Log:
  merge up to 1.3 docs
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.22.2.2  +15 -15apache/htdocs/manual/mod/mod_proxy.html
  
  Index: mod_proxy.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/mod/mod_proxy.html,v
  retrieving revision 1.22.2.1
  retrieving revision 1.22.2.2
  diff -u -r1.22.2.1 -r1.22.2.2
  --- mod_proxy.html1997/06/27 03:02:13 1.22.2.1
  +++ mod_proxy.html1997/07/27 17:16:18 1.22.2.2
  @@ -28,7 +28,7 @@
   h2Summary/h2
   
   This module implements a proxy/cache for Apache. It implements
  -proxying capability for 
  +proxying capability for
   codeFTP/code,
   codeCONNECT/code (for SSL),
   codeHTTP/0.9/code, and
  @@ -58,7 +58,7 @@
   A name=proxyrequestsh2ProxyRequests/h2/A
   strongSyntax:/strong ProxyRequests emon/off/embr
   strongDefault:/strong codeProxyRequests Off/codebr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong ProxyRequest is only available in
  @@ -70,7 +70,7 @@
   
   A name=proxyremoteh2ProxyRemote/h2/A
   strongSyntax:/strong ProxyRemote emlt;matchgt; 
lt;remote-servergt;/embr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong ProxyRemote is only available in
  @@ -102,7 +102,7 @@
   
   A name=proxypassh2ProxyPass/h2/A
   strongSyntax:/strong ProxyPass emlt;pathgt; lt;urlgt;/embr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong ProxyPass is only available in
  @@ -122,7 +122,7 @@
   
   A name=proxyblockh2ProxyBlock/h2/A
   strongSyntax:/strong ProxyBlock emlt;word/host/domain 
listgt;/embr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong ProxyBlock is only available in
  @@ -152,7 +152,7 @@
   
   A name=cacherooth2CacheRoot/h2/A
   strongSyntax:/strong CacheRoot emlt;directorygt;/embr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong CacheRoot is only available in
  @@ -165,7 +165,7 @@
   A name=cachesizeh2CacheSize/h2/A
   strongSyntax:/strong CacheSize emlt;sizegt;/embr
   strongDefault:/strong codeCacheSize 5/codebr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong CacheSize is only available in
  @@ -177,7 +177,7 @@
   
   A name=cachegcintervalh2CacheGcInterval/h2/A
   strongSyntax:/strong CacheGcInterval emlt;timegt;/embr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong CacheGcinterval is only available in
  @@ -189,7 +189,7 @@
   A name=cachemaxexpireh2CacheMaxExpire/h2/A
   strongSyntax:/strong CacheMaxExpire emlt;timegt;/embr
   strongDefault:/strong codeCacheMaxExpire 24/codebr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong CacheMaxExpire is only available in
  @@ -203,7 +203,7 @@
   A name=cachelastmodifiedfactorh2CacheLastModifiedFactor/h2/A
   strongSyntax:/strong CacheLastModifiedFactor emlt;factorgt;/embr
   strongDefault:/strong codeCacheLastModifiedFactor 0.1/codebr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong CacheLastModifiedFactor is only available in
  @@ -223,7 +223,7 @@
   A name=cachedirlevelsh2CacheDirLevels/h2/A
   strongSyntax:/strong CacheDirLevels emlt;levelsgt;/embr
   strongDefault:/strong codeCacheDirLevels 3/codebr
  -strongContext:/strong server configbr
  +strongContext:/strong server config, virtual hostbr
   strongStatus:/strong Basebr
   strongModule:/strong mod_proxybr
   strongCompatibility:/strong CacheDirLevels is only available in
  @@ -235,7 +235,7 @@
   A name=cachedirlengthh2CacheDirLength/h2/A
   strongSyntax:/strong CacheDirLength emlt;lengthgt;/embr
   strongDefault:/strong codeCacheDirLength 1/codebr
  -strongContext:/strong server configbr
  +strongContext:/strong 

cvs commit: apache/htdocs/manual/misc descriptors.html

1997-07-27 Thread Dean Gaudet
dgaudet 97/07/27 10:17:43

  Modified:htdocs/manual/misc  Tag: APACHE_1_2_X  descriptors.html
  Log:
  merge up to 1.3 docs
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.4   +1 -1  apache/htdocs/manual/misc/descriptors.html
  
  Index: descriptors.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/misc/descriptors.html,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- descriptors.html  1997/07/20 18:30:21 1.1.2.3
  +++ descriptors.html  1997/07/27 17:17:42 1.1.2.4
  @@ -109,7 +109,7 @@
   240 error logs if you do this.
   p
   
  -dtSTRONGAIX STRONG
  +dtSTRONGAIX/STRONG
   ddAIX version 3.2?? appears to have a hard limit of 128 descriptors.
End of story.  Version 4.1.5 has a hard limit of 2000.
   p
  
  
  


cvs commit: apache/htdocs/manual/misc FAQ.html

1997-07-27 Thread Dean Gaudet
dgaudet 97/07/27 10:19:03

  Modified:htdocs/manual/misc  Tag: APACHE_1_2_X  FAQ.html
  Log:
  merge up to 1.3 base
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.63.2.12 +243 -3apache/htdocs/manual/misc/FAQ.html
  
  Index: FAQ.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/misc/FAQ.html,v
  retrieving revision 1.63.2.11
  retrieving revision 1.63.2.12
  diff -u -r1.63.2.11 -r1.63.2.12
  --- FAQ.html  1997/07/15 02:07:57 1.63.2.11
  +++ FAQ.html  1997/07/27 17:19:01 1.63.2.12
  @@ -15,7 +15,7 @@
 !--#include virtual=header.html --
 H1 ALIGN=CENTERApache Server Frequently Asked Questions/H1
 P
  -  $Revision: 1.63.2.11 $ ($Date: 1997/07/15 02:07:57 $)
  +  $Revision: 1.63.2.12 $ ($Date: 1997/07/27 17:19:01 $)
 /P
 P
 The latest version of this FAQ is always available from the main
  @@ -77,6 +77,8 @@
   !--   the simple fact that older versions of Apache (and new ones  --
   !--   that have been upgraded without upgrading the mime.types --
   !--   file) don't have the type listed at all. --
  +!-- - Why is my .htaccess ignored? --
  +!-- - RewriteRule /~fraggle/* /cgi-bin/fraggle.pl does not work--
   UL
LISTRONGBackground/STRONG
 OL START=1
  @@ -204,6 +206,9 @@
  LIA HREF=#user-authenticationHow do I set up Apache to require
   a username and password to access certain documents?/A
  /LI
  +   LIA HREF=#remote-user-varWhy is the environment variable
  +   SAMPREMOTE_USER/SAMP not set?/A
  +   /LI
  LIA HREF=#remote-auth-onlyHow do I set up Apache to allow access
   to certain documents only if a site is either a local site
   EMor/EM the user supplies a password and username?/A
  @@ -220,6 +225,30 @@
  /LI
  LIA HREF=#msql-slowWhy is my mSQL authentification terribly 
slow?/A
  /LI
  +   LIA HREF=#rewrite-more-configWhere can I find mod_rewrite rulesets
  +   which already solve particular URL-related problems?/A
  +   /LI
  +   LIA HREF=#rewrite-articleWhere can I find any published information 
about
  +   URL-manipulations and mod_rewrite?/A
  +   /LI
  +   LIA HREF=#rewrite-complexityWhy is mod_rewrite so difficult to learn
  +   and seems so complicated?/A
  +   /LI
  +   LIA HREF=#rewrite-dontworkWhat can I do if my RewriteRules don't 
work
  +   as expected?/A
  +   /LI
  +   LIA HREF=#rewrite-prefixdocrootWhy are some of my URLs don't get
  +   prefixed with DocumentRoot when using mod_rewrite?/A
  +   /LI
  +   LIA HREF=#rewrite-nocaseHow can I make all my URLs case-insensitive
  +   with mod_rewrite?/A
  +   /LI
  +   LIA HREF=#rewrite-virthostWhy are RewriteRules in my VirtualHost
  +   parts ignored?/A
  +   /LI
  +   LIA HREF=#rewrite-envwhitespaceHow can I use strings with 
whitespaces
  +   in RewriteRule's ENV flag?/A
  +   /LI
 /OL
/LI
   /UL
  @@ -310,7 +339,7 @@
 STRONGHow thoroughly tested is Apache?/STRONG
/A
 P
  -  Apache is run on over 400,000 Internet servers (as of April 1997). It has
  +  Apache is run on over 500,000 Internet servers (as of July 1997). It has
 been tested thoroughly by both developers and users. The Apache Group
 maintains rigorous standards before releasing new versions of their
 server, and our server runs without a hitch on over one third of all
  @@ -572,6 +601,39 @@
   /P
  /LI
 /OL
  +  In some situations it can be not conform to your local policy to actually
  +  allow all files named quot;SAMP*.cgi/SAMPquot; to be executable.
  +  Perhaps all you want is to enable a particular file in a normal directory 
to
  +  be executable. This can be alternatively accomplished 
  +  via 
  +  A
  +   HREF=../mod/mod_rewrite.html
  +  SAMPmod_rewrite/SAMP/A 
  +  and the following steps:
  +  /P
  +  OL
  +   LILocally add to the corresponding SAMP.htaccess/SAMP file a ruleset
  +   similar to this one:
  +P
  +DL
  + DDCODE
  +  RewriteEngine onbr
  +  RewriteBase   /~foo/bar/br
  +  RewriteRule   ^quux\.cgi$  -  [T=application/x-httpd-cgi]br
  +  /CODE/DD
  +/DL
  +/P
  +   /LI
  +   LIMake sure that the directory location is covered by an
  +A
  + HREF=../mod/core.html#options
  +SAMPOptions/SAMP/A
  + declaration that includes the SAMPExecCGI/SAMP and
  + SAMPFollowSymLinks/SAMP option.
  +P
  +/P
  +   /LI
  +  /OL
 HR
/LI
LIA NAME=premature-script-headers
  @@ -1561,7 +1623,7 @@
 A HREF=../mod/mod_auth_dbm.htmlmod_auth_dbm/A modules.
 /P
 P
  -  For an explaination on how to implement these restrictions, see
  +  For an explanation on how to implement these restrictions, see
 A
  HREF=http://www.apacheweek.com/;
 CITEApache Week/CITE/A's
  @@ -1576,6 +1638,36 @@
 /P
 HR
/LI
  

cvs commit: apache/src mod_status.c util.c conf.h

1997-07-26 Thread Dean Gaudet
dgaudet 97/07/26 18:21:43

  Modified:src   mod_status.c util.c conf.h
  Log:
  Move difftime() defn from mod_status.c to util.c, and test NEED_DIFFTIME.
  Only SUNOS4 uses NEED_DIFFTIME.
  
  Revision  ChangesPath
  1.55  +0 -9  apache/src/mod_status.c
  
  Index: mod_status.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_status.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- mod_status.c  1997/07/24 04:32:29 1.54
  +++ mod_status.c  1997/07/27 01:21:40 1.55
  @@ -157,15 +157,6 @@
rprintf(r, %ld second%s,secs,secs==1?:s);
   }
   
  -#if defined(SUNOS4)
  -double
  -difftime(time1, time0)
  -time_t time1, time0;
  -{   
  -return(time1 - time0);
  -}   
  -#endif
  -
   /* Main handler for x-httpd-status requests */
   
   /* ID values for command table */
  
  
  
  1.65  +7 -0  apache/src/util.c
  
  Index: util.c
  ===
  RCS file: /export/home/cvs/apache/src/util.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- util.c1997/07/21 05:53:52 1.64
  +++ util.c1997/07/27 01:21:40 1.65
  @@ -1421,3 +1421,10 @@
   #endif
   }
   #endif /* NO_SLACK */
  +
  +#if defined(NEED_DIFFTIME)
  +double difftime(time_t time1, time_t time0)
  +{
  +return(time1 - time0);
  +}
  +#endif
  
  
  
  1.118 +1 -0  apache/src/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apache/src/conf.h,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- conf.h1997/07/24 04:35:46 1.117
  +++ conf.h1997/07/27 01:21:41 1.118
  @@ -91,6 +91,7 @@
   #define memmove(a,b,c) bcopy(b,a,c)
   #define NO_LINGCLOSE
   #define USE_FLOCK_SERIALIZED_ACCEPT
  +#define NEED_DIFFTIME
   
   #elif defined(SOLARIS2)
   #undef HAVE_GMTOFF
  
  
  


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

1997-07-26 Thread Dean Gaudet
dgaudet 97/07/26 18:43:39

  Modified:src   mod_access.c mod_actions.c mod_alias.c mod_auth.c 
mod_auth_db.c mod_auth_dbm.c mod_auth_msql.c
mod_browser.c  mod_cgi.c mod_dld.c mod_env.c
mod_expires.c mod_headers.c  mod_imap.c
mod_include.c mod_info.c mod_log_config.c 
mod_mime.c mod_negotiation.c mod_status.c
mod_userdir.c
   src/modules/proxy  mod_proxy.c
  Log:
  Make modules use static liberally.  This patch only adds static to a
  bunch of functions in modules, doesn't change anything else.  Or at
  least it shouldn't change anything else.
  
  Revision  ChangesPath
  1.20  +8 -8  apache/src/mod_access.c
  
  Index: mod_access.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_access.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- mod_access.c  1997/07/21 05:53:48 1.19
  +++ mod_access.c  1997/07/27 01:43:21 1.20
  @@ -81,7 +81,7 @@
   
   module MODULE_VAR_EXPORT access_module;
   
  -void *create_access_dir_config (pool *p, char *dummy)
  +static void *create_access_dir_config (pool *p, char *dummy)
   {
   access_dir_conf *conf =
   (access_dir_conf *)pcalloc(p, sizeof(access_dir_conf));
  @@ -94,7 +94,7 @@
   return (void *)conf;
   }
   
  -const char *order (cmd_parms *cmd, void *dv, char *arg)
  +static const char *order (cmd_parms *cmd, void *dv, char *arg)
   {
   access_dir_conf *d = (access_dir_conf *)dv;
   int i, o;
  @@ -111,7 +111,7 @@
   return NULL;
   }
   
  -const char *allow_cmd (cmd_parms *cmd, void *dv, char *from, char *where)
  +static const char *allow_cmd (cmd_parms *cmd, void *dv, char *from, char 
*where)
   {
   access_dir_conf *d = (access_dir_conf *)dv;
   allowdeny *a;
  @@ -127,7 +127,7 @@
   
   static char its_an_allow;
   
  -command_rec access_cmds[] = {
  +static command_rec access_cmds[] = {
   { order, order, NULL, OR_LIMIT, TAKE1,
   'allow,deny', 'deny,allow', or 'mutual-failure' },
   { allow, allow_cmd, its_an_allow, OR_LIMIT, ITERATE2,
  @@ -137,7 +137,7 @@
   {NULL}
   };
   
  -int in_domain(const char *domain, const char *what) {
  +static int in_domain(const char *domain, const char *what) {
   int dl=strlen(domain);
   int wl=strlen(what);
   
  @@ -155,7 +155,7 @@
   return 0;
   }
   
  -int in_ip(char *domain, char *what) {
  +static int in_ip(char *domain, char *what) {
   
   /* Check a similar screw case to the one checked above ---
* allow from 204.26.2 shouldn't let in people from 204.26.23
  @@ -174,7 +174,7 @@
   return (*host == '\0');
   }
   
  -int find_allowdeny (request_rec *r, array_header *a, int method)
  +static int find_allowdeny (request_rec *r, array_header *a, int method)
   {
   allowdeny *ap = (allowdeny *)a-elts;
   int mmask = (1  method);
  @@ -224,7 +224,7 @@
   return 0;
   }
   
  -int check_dir_access (request_rec *r)
  +static int check_dir_access (request_rec *r)
   {
   int method = r-method_number;
   access_dir_conf *a =
  
  
  
  1.14  +7 -7  apache/src/mod_actions.c
  
  Index: mod_actions.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_actions.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_actions.c 1997/07/17 22:27:31 1.13
  +++ mod_actions.c 1997/07/27 01:43:21 1.14
  @@ -85,7 +85,7 @@
   
   module action_module;
   
  -void *create_action_dir_config (pool *p, char *dummy)
  +static void *create_action_dir_config (pool *p, char *dummy)
   {
   action_dir_config *new =
 (action_dir_config *) palloc (p, sizeof(action_dir_config));
  @@ -99,7 +99,7 @@
   return new;
   }
   
  -void *merge_action_dir_configs (pool *p, void *basev, void *addv)
  +static void *merge_action_dir_configs (pool *p, void *basev, void *addv)
   {
   action_dir_config *base = (action_dir_config *)basev;
   action_dir_config *add = (action_dir_config *)addv;
  @@ -117,14 +117,14 @@
   return new;
   }
   
  -const char *add_action(cmd_parms *cmd, action_dir_config *m, char *type,
  +static const char *add_action(cmd_parms *cmd, action_dir_config *m, char 
*type,
   char *script)
   {
   table_set (m-action_types, type, script);
   return NULL;
   }
   
  -const char *set_script (cmd_parms *cmd, action_dir_config *m, char *method,
  +static const char *set_script (cmd_parms *cmd, action_dir_config *m, char 
*method,
char *script)
   {
   if (!strcmp(method, GET))
  @@ -141,7 +141,7 @@
   return NULL;
   }
   
  -command_rec action_cmds[] = {
  +static command_rec action_cmds[] = {
   { Action, add_action, NULL, OR_FILEINFO, TAKE2, 
 

cvs commit: apache/src http_config.c

1997-07-26 Thread Dean Gaudet
dgaudet 97/07/26 18:56:04

  Modified:src   http_config.c
  Log:
  Properly cast the -func parm of command_rec before calling it.  This is to
  improve portability.
  
  Revision  ChangesPath
  1.66  +30 -12apache/src/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apache/src/http_config.c,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- http_config.c 1997/07/24 04:38:08 1.65
  +++ http_config.c 1997/07/27 01:56:03 1.66
  @@ -569,14 +569,16 @@
   
   switch (cmd-args_how) {
   case RAW_ARGS:
  -return (*cmd-func) (parms, mconfig, args);
  +return ((const char * (*)(cmd_parms *, void *, const char *))
  + (*cmd-func)) (parms, mconfig, args);
   
   case NO_ARGS:
if (*args != 0)
return pstrcat (parms-pool, cmd-name,  takes no arguments,
NULL);
   
  - return (*cmd-func) (parms, mconfig);
  + return ((const char * (*)(cmd_parms *, void *))
  + (*cmd-func)) (parms, mconfig);

   case TAKE1:
w = getword_conf (parms-pool, args);
  @@ -585,7 +587,8 @@
return pstrcat (parms-pool, cmd-name,  takes one argument,
cmd-errmsg ? ,  : NULL, cmd-errmsg, NULL);
   
  - return (*cmd-func) (parms, mconfig, w);
  + return ((const char * (*)(cmd_parms *, void *, const char *))
  + (*cmd-func)) (parms, mconfig, w);

   case TAKE2:
   
  @@ -596,7 +599,8 @@
return pstrcat (parms-pool, cmd-name,  takes two arguments,
cmd-errmsg ? ,  : NULL, cmd-errmsg, NULL);
   
  - return (*cmd-func) (parms, mconfig, w, w2);
  + return ((const char * (*)(cmd_parms *, void *, const char *,
  + const char *))(*cmd-func)) (parms, mconfig, w, w2);

   case TAKE12:
   
  @@ -607,7 +611,9 @@
return pstrcat (parms-pool, cmd-name,  takes 1-2 arguments,
cmd-errmsg ? ,  : NULL, cmd-errmsg, NULL);
   
  - return (*cmd-func) (parms, mconfig, w, *w2 ? w2 : NULL);
  + return ((const char * (*)(cmd_parms *, void *, const char *,
  + const char *))(*cmd-func)) (parms, mconfig, w,
  + *w2 ? w2 : NULL);

   case TAKE3:
   
  @@ -619,7 +625,9 @@
return pstrcat (parms-pool, cmd-name,  takes three arguments,
cmd-errmsg ? ,  : NULL, cmd-errmsg, NULL);
   
  - return (*cmd-func) (parms, mconfig, w, w2, w3);
  + return ((const char * (*)(cmd_parms *, void *, const char *,
  + const char *, const char *))(*cmd-func)) (parms,
  + mconfig, w, w2, w3);

   case TAKE23:
   
  @@ -631,7 +639,9 @@
return pstrcat (parms-pool, cmd-name,  takes two or three 
arguments,
cmd-errmsg ? ,  : NULL, cmd-errmsg, NULL);
   
  - return (*cmd-func) (parms, mconfig, w, w2, w3);
  + return ((const char * (*)(cmd_parms *, void *, const char *,
  + const char *, const char *))(*cmd-func)) (parms,
  + mconfig, w, w2, w3);

   case TAKE123:
   
  @@ -643,7 +653,9 @@
return pstrcat (parms-pool, cmd-name,  takes one, two or three 
arguments,
cmd-errmsg ? ,  : NULL, cmd-errmsg, NULL);
   
  - return (*cmd-func) (parms, mconfig, w, w2, w3);
  + return ((const char * (*)(cmd_parms *, void *, const char *,
  + const char *, const char *))(*cmd-func)) (parms,
  + mconfig, w, w2, w3);

   case TAKE13:
   
  @@ -655,12 +667,15 @@
return pstrcat (parms-pool, cmd-name,  takes one or three 
arguments,
cmd-errmsg ? ,  : NULL, cmd-errmsg, NULL);
   
  - return (*cmd-func) (parms, mconfig, w, w2, w3);
  + return ((const char * (*)(cmd_parms *, void *, const char *,
  + const char *, const char *))(*cmd-func)) (parms,
  + mconfig, w, w2, w3);

   case ITERATE:
   
while (*(w = getword_conf (parms-pool, args)) != '\0')
  - if ((errmsg = (*cmd-func) (parms, mconfig, w)))
  + if ((errmsg = ((const char * (*)(cmd_parms *, void *,
  + const char *))(*cmd-func)) (parms, mconfig, w)))
return errmsg;
   
return NULL;
  @@ -676,7 +691,9 @@
  
   
while (*(w2 = getword_conf (parms-pool, args)) != '\0')
  - if ((errmsg = (*cmd-func) (parms, mconfig, w, w2)))
  + if ((errmsg = ((const char * (*)(cmd_parms *, void *,
  + const char *, const char *))(*cmd-func)) (parms,
  + mconfig, w, w2)))
return errmsg;
   
return NULL;
  @@ -689,7 +706,8 @@
return pstrcat (parms-pool, cmd-name,  must be 

cvs commit: apache/src util.c

1997-07-26 Thread Dean Gaudet
dgaudet 97/07/26 19:07:21

  Modified:src   util.c
  Log:
  chdir_file takes a const char *.  It shouldn't modify its argument.
  
  Revision  ChangesPath
  1.66  +14 -7 apache/src/util.c
  
  Index: util.c
  ===
  RCS file: /export/home/cvs/apache/src/util.c,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- util.c1997/07/27 01:21:40 1.65
  +++ util.c1997/07/27 02:07:20 1.66
  @@ -424,14 +424,21 @@
   }
   
   
  -API_EXPORT(void) chdir_file(const char *file) {
  -int i;
  +API_EXPORT(void) chdir_file(const char *file)
  +{
  +const char *x;
  +char buf[HUGE_STRING_LEN];
   
  -if((i = rind(file,'/')) == -1)
  -return;
  -((char *)file)[i] = '\0';
  -chdir(file);
  -((char *)file)[i] = '/';
  +x = strrchr (file, '/');
  +if (x == NULL) {
  + chdir (file);
  +} else if (x - file  sizeof(buf)-1) {
  + memcpy (buf, file, x - file);
  + buf[x - file] = '\0';
  + chdir (buf);
  +}
  +/* XXX: well, this is a silly function, no method of reporting an
  + * error... ah well. */
   }
   
   API_EXPORT(char *) getword_nc(pool* atrans, char **line, char stop)
  
  
  


cvs commit: apache/src mod_rewrite.c

1997-07-26 Thread Dean Gaudet
dgaudet 97/07/26 19:10:41

  Modified:src   mod_rewrite.c
  Log:
  add static to cachep.  (Ralf if it's exported for a reason I can't see
  then maybe change it to rewrite_cachep)
  
  Revision  ChangesPath
  1.41  +1 -1  apache/src/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_rewrite.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- mod_rewrite.c 1997/07/26 11:33:44 1.40
  +++ mod_rewrite.c 1997/07/27 02:10:39 1.41
  @@ -217,7 +217,7 @@
   };
   
   /* the cache */
  -cache *cachep;
  +static cache *cachep;
   
   /* whether proxy module is available or not */
   static int proxy_available;
  
  
  


cvs commit: apache/src CHANGES mod_cern_meta.c

1997-07-26 Thread Dean Gaudet
dgaudet 97/07/26 19:38:05

  Modified:src   CHANGES mod_cern_meta.c
  Log:
  fix problem with trying to find meta files for a directory in some cases,
  but not in others.
  
  Revision  ChangesPath
  1.368 +4 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.367
  retrieving revision 1.368
  diff -u -r1.367 -r1.368
  --- CHANGES   1997/07/27 02:34:42 1.367
  +++ CHANGES   1997/07/27 02:38:03 1.368
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3a2
   
  +  *) mod_cern_meta would attempt to find meta files for the directory itself
  + in some cases, but not in others.  It now avoids it in all cases.
  + [Dean Gaudet]
  +
 *) mod_mime_magic would core dump if there was a decompression error.
[Martin Kraemer [EMAIL PROTECTED]] PR#904
   
  
  
  
  1.15  +2 -2  apache/src/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_cern_meta.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- mod_cern_meta.c   1997/07/17 22:27:34 1.14
  +++ mod_cern_meta.c   1997/07/27 02:38:04 1.15
  @@ -253,8 +253,8 @@
return DECLINED;
   };
   
  -/* does uri end in a trailing slash? */
  -if ( r-uri[strlen(r-uri) - 1] == '/' ) {
  +/* is this a directory? */
  +if (S_ISDIR(r-finfo.st_mode) || r-uri[strlen(r-uri) - 1] == '/') {
return DECLINED;
   };
   
  
  
  


  1   2   3   >