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

1998-01-31 Thread dgaudet
dgaudet 98/01/30 16:15:45

  Modified:src/main http_protocol.c http_request.c
  Log:
  (Recall: whenever a table's nelts == nalloc and a push is attempted
  the table size will be doubled, and the old table copied to the new
  table.  It's nice to avoid this if it's easy.)
  
  Our default server outputs 8 headers, with the expires module it will
  do 10 headers.  Increase the default r-headers_out table to size 12
  to accomodate that (plus a cookie and one other thing).
  
  rename_original_environment should use nalloc instead of nelts when
  selecting a table size.
  
  Revision  ChangesPath
  1.183 +1 -1  apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.182
  retrieving revision 1.183
  diff -u -r1.182 -r1.183
  --- http_protocol.c   1998/01/28 11:33:21 1.182
  +++ http_protocol.c   1998/01/31 00:15:43 1.183
  @@ -786,7 +786,7 @@
   
   r-headers_in  = make_table(r-pool, 50);
   r-subprocess_env  = make_table(r-pool, 50);
  -r-headers_out = make_table(r-pool, 5);
  +r-headers_out = make_table(r-pool, 12);
   r-err_headers_out = make_table(r-pool, 5);
   r-notes   = make_table(r-pool, 5);
   
  
  
  
  1.104 +2 -2  apache-1.3/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_request.c,v
  retrieving revision 1.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- http_request.c1998/01/27 02:41:11 1.103
  +++ http_request.c1998/01/31 00:15:44 1.104
  @@ -1162,7 +1162,7 @@
   {
   array_header *env_arr = table_elts(t);
   table_entry *elts = (table_entry *) env_arr-elts;
  -table *new = make_table(p, env_arr-nelts);
  +table *new = make_table(p, env_arr-nalloc);
   int i;
   
   for (i = 0; i  env_arr-nelts; ++i) {
  @@ -1217,7 +1217,7 @@
   new-main= r-main;
   
   new-headers_in  = r-headers_in;
  -new-headers_out = make_table(r-pool, 5);
  +new-headers_out = make_table(r-pool, 12);
   new-err_headers_out = r-err_headers_out;
   new-subprocess_env  = rename_original_env(r-pool, r-subprocess_env);
   new-notes   = make_table(r-pool, 5);
  
  
  


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

1998-01-31 Thread dgaudet
dgaudet 98/01/30 16:24:33

  Modified:src  CHANGES
   src/main alloc.c
  Log:
  People are challenging me to write something in assembly... well gcc is so
  nice that I don't have to do this one in assembly.  MAKE_TABLE_PROFILE is
  a debugging mode that makes it easier to find tables which are created
  with too small an initial guess.  It uses __builtin_return_address()
  which is a gcc directive that avoids the need for arch specific assembly
  to find the return address of the function you're in... super ultra cool
  for debugging.
  
  Revision  ChangesPath
  1.608 +6 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.607
  retrieving revision 1.608
  diff -u -r1.607 -r1.608
  --- CHANGES   1998/01/30 19:30:31 1.607
  +++ CHANGES   1998/01/31 00:24:29 1.608
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3b4
   
  +  *) Tweaked the headers_out table size, and the subprocess_env
  + table size guess in rename_original_environment().  Added
  + MAKE_TABLE_PROFILE which can help discover make_table()
  + calls that use too small an initial guess, see alloc.c.
  + [Dean Gaudet]
  +
 *) Options and AllowOverrides weren't properly merging in the main
server setting inside vhosts (only an issue when you have no
Directory or other section containing an Options that affects
  
  
  
  1.73  +37 -7 apache-1.3/src/main/alloc.c
  
  Index: alloc.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/alloc.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- alloc.c   1998/01/27 10:04:35 1.72
  +++ alloc.c   1998/01/31 00:24:32 1.73
  @@ -97,6 +97,17 @@
*/
   /* #define POOL_DEBUG */
   
  +/* Provide diagnostic information about make_table() calls which are
  + * possibly too small.  This requires a recent gcc which supports
  + * __builtin_return_address().  The error_log output will be a
  + * message such as:
  + *table_push: table created by 0x804d874 hit limit of 10
  + * Use l *0x804d874 to find the source that corresponds to.  It
  + * indicates that a table allocated by a call at that address has
  + * possibly too small an initial table size guess.
  + */
  +/* #define MAKE_TABLE_PROFILE */
  +
   #ifdef POOL_DEBUG
   #ifdef ALLOC_USE_MALLOC
   # error sorry, no support for ALLOC_USE_MALLOC and POOL_DEBUG at the same 
time
  @@ -113,7 +124,6 @@
   #define BLOCK_MINALLOC   0
   #endif
   
  -
   /*
*
* Managing free storage blocks...
  @@ -890,14 +900,34 @@
* cases they do this for.
*/
   array_header a;
  +#ifdef MAKE_TABLE_PROFILE
  +void *creator;
  +#endif
   };
   
  +#ifdef MAKE_TABLE_PROFILE
  +static table_entry *table_push(table *t)
  +{
  +if (t-a.nelts == t-a.nalloc) {
  + fprintf(stderr,
  + table_push: table created by %p hit limit of %u\n,
  + t-creator, t-a.nalloc);
  +}
  +return (table_entry *) push_array(t-a);
  +}
  +#else
  +#define table_push(t)((table_entry *) push_array((t)-a))
  +#endif
  +
   
   API_EXPORT(table *) make_table(pool *p, int nelts)
   {
   table *t = palloc(p, sizeof(table));
   
   make_array_core(t-a, p, nelts, sizeof(table_entry));
  +#ifdef MAKE_TABLE_PROFILE
  +t-creator = __builtin_return_address(0);
  +#endif
   return t;
   }
   
  @@ -967,7 +997,7 @@
   }
   
   if (!done) {
  - elts = (table_entry *) push_array(t-a);
  + elts = (table_entry *) table_push(t);
elts-key = pstrdup(t-a.pool, key);
elts-val = pstrdup(t-a.pool, val);
   }
  @@ -1013,7 +1043,7 @@
   }
   
   if (!done) {
  - elts = (table_entry *) push_array(t-a);
  + elts = (table_entry *) table_push(t);
elts-key = key;
elts-val = val;
   }
  @@ -1055,7 +1085,7 @@
return;
}
   
  -elts = (table_entry *) push_array(t-a);
  +elts = (table_entry *) table_push(t);
   elts-key = pstrdup(t-a.pool, key);
   elts-val = pstrdup(t-a.pool, val);
   }
  @@ -1085,7 +1115,7 @@
}
   }
   
  -elts = (table_entry *) push_array(t-a);
  +elts = (table_entry *) table_push(t);
   elts-key = key;
   elts-val = val;
   }
  @@ -1094,7 +1124,7 @@
   {
   table_entry *elts = (table_entry *) t-a.elts;
   
  -elts = (table_entry *) push_array(t-a);
  +elts = (table_entry *) table_push(t);
   elts-key = pstrdup(t-a.pool, key);
   elts-val = pstrdup(t-a.pool, val);
   }
  @@ -1116,7 +1146,7 @@
   }
   #endif
   
  -elts = (table_entry *) push_array(t-a);
  +elts = (table_entry *) table_push(t);
   elts-key = key;
   elts-val = val;
   }
  
  
  


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

1998-01-31 Thread ben
ben 98/01/31 06:38:24

  Modified:src/modules/standard mod_setenvif.c
  Log:
  Make setenvif terminate when it should, instead of by accident, and also
  correctly handle multiple env vars to be set. As a side-effect, eliminate
  an env var with a null name.
  
  Revision  ChangesPath
  1.14  +7 -2  apache-1.3/src/modules/standard/mod_setenvif.c
  
  Index: mod_setenvif.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_setenvif.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_setenvif.c1998/01/26 19:50:24 1.13
  +++ mod_setenvif.c1998/01/31 14:38:23 1.14
  @@ -176,7 +176,10 @@
   cmd-cmd-name, NULL);
   return error;
   }
  -while ((feature = getword_conf(cmd-pool, cmdline))) {
  +for( ; ; ) {
  + feature = getword_conf(cmd-pool, cmdline);
  + if(!*feature)
  + break;
   beenhere++;
   
   /*
  @@ -196,7 +199,7 @@
   else {
   table_set(b-features, var, 1);
   }
  -return NULL;
  + goto next;
   }
   }
   
  @@ -226,6 +229,8 @@
   else {
   table_set(new-features, var, 1);
   }
  +next:
  + continue;
   }
   
   if (!beenhere) {
  
  
  


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

1998-01-31 Thread pcs
pcs 98/01/31 06:54:22

  Modified:src/main http_main.c
  Log:
  The Win32 debug macros now default to logging to the error log,
  at debug level, rather than to the console.
  
  Revision  ChangesPath
  1.279 +5 -2  apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.278
  retrieving revision 1.279
  diff -u -r1.278 -r1.279
  --- http_main.c   1998/01/30 09:59:21 1.278
  +++ http_main.c   1998/01/31 14:54:20 1.279
  @@ -112,11 +112,14 @@
   /* special debug stuff -- PCS */
   
 /* APD1() to APD5() are macros to help us debug. Then can either
  -   * log to the screen or the error_log file.
  +   * log to the screen or the error_log file. In release builds, this
  +   * macros do nothing. In debug builds, they send messages at priority
  +   * debug to the error log file, or if DEBUG_TO_CONSOLE is defined,
  +   * to the console.
  */
   
   # ifdef _DEBUG
  -#  ifdef DEBUG_TO_ERROR_LOG
  +#  ifndef DEBUG_TO_CONSOLE
   #   define APD1(a) 
aplog_error(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,server_conf,a)
   #   define APD2(a,b) 
aplog_error(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,server_conf,a,b)
   #   define APD3(a,b,c) 
aplog_error(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,server_conf,a,b,c)
  
  
  


cvs commit: apache-1.3/src/os/bs2000 os.h

1998-01-31 Thread martin
martin  98/01/31 15:52:50

  Modified:src/os/bs2000 os.h
  Log:
  Fix include problem for BS2000 compilation
  
  Revision  ChangesPath
  1.3   +1 -1  apache-1.3/src/os/bs2000/os.h
  
  Index: os.h
  ===
  RCS file: /home/cvs/apache-1.3/src/os/bs2000/os.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- os.h  1998/01/26 16:46:17 1.2
  +++ os.h  1998/01/31 23:52:49 1.3
  @@ -6,7 +6,7 @@
* and prototypes of OS specific functions defined in os.c or os-inline.c
*/
   
  -#include httpd.h
  +#include conf.h
   
   #if !defined(INLINE)  defined(USE_GNU_INLINE)
   /* Compiler supports inline, so include the inlineable functions as
  
  
  


cvs commit: apache-1.3/src/ap ap_execve.c

1998-01-31 Thread martin
martin  98/01/31 15:54:34

  Modified:src/ap   ap_execve.c
  Log:
  Remove unnecessary depedency on aplog_error() -- it was a debugging output
  anyway.
  
  Submitted by: Ken Coar
  
  Revision  ChangesPath
  1.4   +0 -4  apache-1.3/src/ap/ap_execve.c
  
  Index: ap_execve.c
  ===
  RCS file: /home/cvs/apache-1.3/src/ap/ap_execve.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- ap_execve.c   1998/01/25 16:13:12 1.3
  +++ ap_execve.c   1998/01/31 23:54:33 1.4
  @@ -144,10 +144,6 @@
*/
 (argv = hashbang(filename, argv)) != NULL) {
   
  -aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, NULL,
  -Script %s needs interpreter %s to exec, filename,
  -argv[0]);
  -
/* new filename is the interpreter to call */
filename = argv[0];
   
  
  
  


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

1998-01-31 Thread martin
martin  98/01/31 15:55:42

  Modified:src/main util.c
  Log:
  For CRLF delimited lines, the line numbering would count incorrect.
  PR: related tpo #1671
  
  Revision  ChangesPath
  1.91  +2 -1  apache-1.3/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/util.c,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -u -r1.90 -r1.91
  --- util.c1998/01/28 11:33:22 1.90
  +++ util.c1998/01/31 23:55:41 1.91
  @@ -812,7 +812,8 @@
if (c == CR) {
/* silently ignore CR (_assume_ that a LF follows) */
c = cfp-getch(cfp-param);
  - } else if (c == LF) {
  + }
  + if (c == LF) {
/* increase line number and return on LF */
++cfp-line_number;
}