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

1998-01-30 Thread dgaudet
dgaudet 98/01/30 11:30:35

  Modified:.STATUS
   src  CHANGES
   src/main http_core.c
  Log:
  Fix Options and AllowOverrides merging in main_server lookup_defaults and
  vhost lookup_defaults.
  
  Revision  ChangesPath
  1.138 +1 -0  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- STATUS1998/01/30 14:51:49 1.137
  +++ STATUS1998/01/30 19:30:30 1.138
  @@ -142,6 +142,7 @@
   * some rfc2068 case insensitivity issues
   * r->allowed cleanup
   * References to undefined 'cwd' cell fixed in suexec.c
  +* fix options/allowoverride merging
   
   Available Patches:
   
  
  
  
  1.607 +6 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.606
  retrieving revision 1.607
  diff -u -r1.606 -r1.607
  --- CHANGES   1998/01/30 14:49:55 1.606
  +++ CHANGES   1998/01/30 19:30:31 1.607
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3b4
   
  +  *) Options and AllowOverrides weren't properly merging in the main
  + server setting inside vhosts (only an issue when you have no
  +  or other section containing an Options that affects
  + a request).  Options +foo or -foo in the main_server wouldn't
  + affect the main_server's lookup defaults.  [Dean Gaudet]
  +
 *) Variable 'cwd' was being used pointlessly before being set.
[Ken Coar] PR#1738
   
  
  
  
  1.153 +21 -10apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.152
  retrieving revision 1.153
  diff -u -r1.152 -r1.153
  --- http_core.c   1998/01/30 03:36:56 1.152
  +++ http_core.c   1998/01/30 19:30:34 1.153
  @@ -112,9 +112,9 @@
   conf->d_is_fnmatch = conf->d ? (is_fnmatch (conf->d) != 0) : 0;
   conf->d_components = conf->d ? count_dirs (conf->d) : 0;
   
  -conf->opts = dir ? OPT_UNSET : OPT_ALL;
  +conf->opts = dir ? OPT_UNSET : OPT_UNSET|OPT_ALL;
   conf->opts_add = conf->opts_remove = OPT_NONE;
  -conf->override = dir ? OR_UNSET : OR_ALL;
  +conf->override = dir ? OR_UNSET : OR_UNSET|OR_ALL;
   
   conf->content_md5 = 2;
   
  @@ -158,11 +158,16 @@
   conf->d_components = new->d_components;
   conf->r = new->r;
   
  -if (new->opts != OPT_UNSET) conf->opts = new->opts;
  -if (new->opts_add) conf->opts |= new->opts_add;
  -if (new->opts_remove) conf->opts &= ~(new->opts_remove);
  +if (!(new->opts & OPT_UNSET)) conf->opts = new->opts;
  +if (new->opts_add) {
  + conf->opts |= new->opts_add;
  + conf->opts &= ~OPT_UNSET;
  +}
  +if (new->opts_remove) {
  + conf->opts &= ~(new->opts_remove | OPT_UNSET);
  +}
   
  -if (new->override != OR_UNSET) conf->override = new->override;
  +if (!(new->override & OR_UNSET)) conf->override = new->override;
   if (new->default_type) conf->default_type = new->default_type;
   
   if (new->auth_type) conf->auth_type = new->auth_type;
  @@ -692,6 +697,7 @@
d->override = OR_ALL;
else 
return pstrcat (cmd->pool, "Illegal override option ", w, NULL);
  + d->override &= ~OR_UNSET;
   }
   
   return NULL;
  @@ -737,12 +743,17 @@
else 
return pstrcat (cmd->pool, "Illegal option ", w, NULL);
   
  - if (action == '-')
  + if (action == '-') {
d->opts_remove |= opt;
  - else if (action == '+')
  + d->opts &= ~opt;
  + }
  + else if (action == '+') {
d->opts_add |= opt;
  - else
  -   d->opts |= opt;
  + d->opts |= opt;
  + }
  + else {
  + d->opts |= opt;
  + }
   }
   
   return NULL;
  
  
  


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

1998-02-08 Thread randy
randy   98/02/08 15:15:35

  Modified:src/main http_core.c
  Log:
  Fix a problem where r->server->port could be used without being
  properly initialized for the active protocol.
  Reviewed by: Dean Gaudet
  
  Revision  ChangesPath
  1.157 +13 -5 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -r1.156 -r1.157
  --- http_core.c   1998/02/02 22:33:32 1.156
  +++ http_core.c   1998/02/08 23:15:34 1.157
  @@ -595,14 +595,17 @@
   
   API_EXPORT(unsigned) get_server_port(const request_rec *r)
   {
  +unsigned port;
   core_dir_config *d =
 (core_dir_config *)get_module_config(r->per_dir_config, &core_module);
   
  +port = r->server->port ? r->server->port : default_port(r);
  +
   if (d->use_canonical_name & 1) {
  - return r->server->port;
  + return port;
   }
   return r->hostname ? ntohs(r->connection->local_addr.sin_port)
  - : r->server->port;
  + : port;
   }
   
   API_EXPORT(char *) construct_url(pool *p, const char *uri, const request_rec 
*r)
  @@ -614,12 +617,17 @@
 (core_dir_config *)get_module_config(r->per_dir_config, &core_module);
   
   if (d->use_canonical_name & 1) {
  - port = r->server->port;
  + port = r->server->port ? r->server->port : default_port(r);
host = r->server->server_hostname;
   }
   else {
  - port = r->hostname ? ntohs(r->connection->local_addr.sin_port)
  - : r->server->port;
  +if (r->hostname)
  +port = ntohs(r->connection->local_addr.sin_port);
  +else if (r->server->port)
  +port = r->server->port;
  +else
  +port = default_port(r);
  +
host = r->hostname ? r->hostname : r->server->server_hostname;
   }
   if (is_default_port(port, r)) {
  
  
  


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

1998-02-20 Thread dgaudet
dgaudet 98/02/19 23:15:47

  Modified:src/main http_core.c
  Log:
  Fix  sections.  I bungled them before.
  
  Submitted by:   Martin Kraemer
  
  Revision  ChangesPath
  1.160 +15 -12apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.159
  retrieving revision 1.160
  diff -u -r1.159 -r1.160
  --- http_core.c   1998/02/18 10:01:13 1.159
  +++ http_core.c   1998/02/20 07:15:46 1.160
  @@ -965,6 +965,7 @@
   void *new_dir_conf = create_per_dir_config (cmd->pool);
   regex_t *r = NULL;
   const char *old_end_token;
  +const command_rec *thiscmd = cmd->cmd;
   
   const char *err = check_cmd_context(cmd, 
NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
   if (err != NULL) return err;
  @@ -978,7 +979,7 @@
   #endif
   cmd->override = OR_ALL|ACCESS_CONF;
   
  -if (cmd->info) { /*  */
  +if (thiscmd->cmd_data) { /*  */
r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
   }
   else if (!strcmp(cmd->path, "~")) {
  @@ -991,13 +992,13 @@
   }
   
   old_end_token = cmd->end_token;
  -cmd->end_token = cmd->info ? end_directorymatch_section : 
end_directory_section;
  +cmd->end_token = thiscmd->cmd_data ? end_directorymatch_section : 
end_directory_section;
   errmsg = srm_command_loop (cmd, new_dir_conf);
   if (errmsg == NULL) {
errmsg = missing_endsection(cmd, 1);
   }
   cmd->end_token = old_end_token;
  -if (errmsg != (cmd->info ? end_directorymatch_section : 
end_directory_section))
  +if (errmsg != (thiscmd->cmd_data ? end_directorymatch_section : 
end_directory_section))
return errmsg;
   
   conf = (core_dir_config *)get_module_config(new_dir_conf, &core_module);
  @@ -1006,7 +1007,7 @@
   add_per_dir_conf (cmd->server, new_dir_conf);
   
   if (*arg != '\0')
  - return pstrcat (cmd->pool, "Multiple <", (cmd->info) ? "DirectoryMatch" 
: "Directory",
  + return pstrcat (cmd->pool, "Multiple ", thiscmd->name,
"> arguments not (yet) supported.", NULL);
   
   cmd->path = old_path;
  @@ -1024,6 +1025,7 @@
   core_dir_config *conf;
   regex_t *r = NULL;
   const char *old_end_token;
  +const command_rec *thiscmd = cmd->cmd;
   
   void *new_url_conf = create_per_dir_config (cmd->pool);
   
  @@ -1035,7 +1037,7 @@
   cmd->path = getword_conf (cmd->pool, &arg);
   cmd->override = OR_ALL|ACCESS_CONF;
   
  -if (cmd->info) { /*  */
  +if (thiscmd->cmd_data) { /*  */
r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED);
   }
   else if (!strcmp(cmd->path, "~")) {
  @@ -1044,13 +1046,13 @@
   }
   
   old_end_token = cmd->end_token;
  -cmd->end_token = cmd->info ? end_locationmatch_section : 
end_location_section;
  +cmd->end_token = thiscmd->cmd_data ? end_locationmatch_section : 
end_location_section;
   errmsg = srm_command_loop (cmd, new_url_conf);
   if (errmsg == NULL) {
errmsg = missing_endsection(cmd, 1);
   }
   cmd->end_token = old_end_token;
  -if (errmsg != (cmd->info ? end_locationmatch_section : 
end_location_section))
  +if (errmsg != (thiscmd->cmd_data ? end_locationmatch_section : 
end_location_section))
return errmsg;
   
   conf = (core_dir_config *)get_module_config(new_url_conf, &core_module);
  @@ -1061,7 +1063,7 @@
   add_per_url_conf (cmd->server, new_url_conf);
   
   if (*arg != '\0')
  - return pstrcat (cmd->pool, "Multiple <", (cmd->info) ? "LocationMatch" 
: "Location",
  + return pstrcat (cmd->pool, "Multiple ", thiscmd->name,
"> arguments not (yet) supported.", NULL);
   
   cmd->path = old_path;
  @@ -1079,6 +1081,7 @@
   core_dir_config *conf;
   regex_t *r = NULL;
   const char *old_end_token;
  +const command_rec *thiscmd = cmd->cmd;
   
   void *new_file_conf = create_per_dir_config (cmd->pool);
   
  @@ -1092,7 +1095,7 @@
   if (!old_path)
cmd->override = OR_ALL|ACCESS_CONF;
   
  -if (cmd->info) { /*  */
  +if (thiscmd->cmd_data) { /*  */
   r = pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
   }
   else if (!strcmp(cmd->path, "~")) {
  @@ -1105,13 +1108,13 @@
   }
   
   old_end_token = cmd->end_token;
  -cmd->end_token = cmd->info ? end_filesmatch_section : end_files_section;
  +cmd->end_token = thiscmd->cmd_data ? end_filesmatch_section : 
end_files_section;
   errmsg = srm_command_loop (cmd, new_file_conf);
   if (errmsg == NULL) {
errmsg = missing_endsection(cmd, 1);
   }
   cmd->end_token = old_end_token;
  -if (errmsg != (cmd->info ? end_filesmatch_section : end_files_section))
  +if (errmsg != (thiscmd->cmd_data ? end_filesmatch_section : 
end_files_section))

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

1998-02-20 Thread martin
martin  98/02/20 02:51:36

  Modified:.STATUS
   src  CHANGES
   src/include http_config.h
   src/main http_core.c
  Log:
  The check_cmd_context() function is now globally usable (Ken's suggestion)
  
  Revision  ChangesPath
  1.159 +0 -4  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.158
  retrieving revision 1.159
  diff -u -u -r1.158 -r1.159
  --- STATUS1998/02/18 22:41:49 1.158
  +++ STATUS1998/02/20 10:51:29 1.159
  @@ -153,10 +153,6 @@
 appropriate environment. Marc and Alexei don't see any
 big deal. Martin says that not every "env" has a -u flag.
   
  -* Ken suggests that new check_cmd_context() and related defines
  -  should be non-static and in util_* so modules can use 'em.  (He
  -  didn't notice this flaw during the review.)
  -
   * 206 vs. 200 issue on Content-Length
See <[EMAIL PROTECTED]>
Roy says current behavior is correct, but Alexei disagrees.
  
  
  
  1.642 +3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.641
  retrieving revision 1.642
  diff -u -u -r1.641 -r1.642
  --- CHANGES   1998/02/20 10:44:32 1.641
  +++ CHANGES   1998/02/20 10:51:30 1.642
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b6
   
  +  *)  As Ken suggested the check_cmd_context() function and related defines
  +  are non-static now so modules can use 'em.  [Martin Kraemer]
  +
 *)  mod_info would occasionally produce an unpaired  in its
 output. Fixed. [Martin Kraemer]
   
  
  
  
  1.68  +13 -0 apache-1.3/src/include/http_config.h
  
  Index: http_config.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/http_config.h,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -u -r1.67 -r1.68
  --- http_config.h 1998/02/18 10:01:10 1.67
  +++ http_config.h 1998/02/20 10:51:33 1.68
  @@ -328,6 +328,19 @@
server_rec *main_server, server_rec **);
   void process_resource_config(server_rec *s, char *fname, pool *p, pool 
*ptemp);
   
  +/* check_cmd_context() definitions: */
  +extern const char *check_cmd_context(cmd_parms *cmd, unsigned forbidden);
  +
  +/* check_cmd_context():  Forbidden in: */
  +#define  NOT_IN_VIRTUALHOST 0x01 /*  */
  +#define  NOT_IN_LIMIT   0x02 /*  */
  +#define  NOT_IN_DIRECTORY   0x04 /*  */
  +#define  NOT_IN_LOCATION0x08 /*  */
  +#define  NOT_IN_FILES   0x10 /*  */
  +#define  NOT_IN_DIR_LOC_FILE
(NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES) /* 
//*/
  +#define  GLOBAL_ONLY
(NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE)
  +
  +
   /* Module-method dispatchers, also for http_request.c */
   
   int translate_name(request_rec *);
  
  
  
  1.161 +17 -13apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.160
  retrieving revision 1.161
  diff -u -u -r1.160 -r1.161
  --- http_core.c   1998/02/20 07:15:46 1.160
  +++ http_core.c   1998/02/20 10:51:34 1.161
  @@ -652,15 +652,8 @@
   static const char end_virtualhost_section[] = "";
   static const char end_ifmodule_section[] = "";
   
  -/* check_cmd_context():  Forbidden in: */
  -#define  NOT_IN_VIRTUALHOST 0x01U /*  */
  -#define  NOT_IN_LIMIT   0x02U /*  */
  -#define  NOT_IN_DIR_LOC_FILE0x04U /* //*/
  -#define  NOT_IN_LOC 0x08U /*  */
  -#define  GLOBAL_ONLY
(NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE)
   
  -
  -static const char *check_cmd_context(cmd_parms *cmd, unsigned forbidden)
  +const char *check_cmd_context(cmd_parms *cmd, unsigned forbidden)
   {
   const char *gt = (cmd->cmd->name[0] == '<'
   && cmd->cmd->name[strlen(cmd->cmd->name)-1] != '>') ? ">" : 
"";
  @@ -673,14 +666,20 @@
return pstrcat(cmd->pool, cmd->cmd->name, gt,
   " cannot occur within  section", NULL);
   
  -if ((forbidden & NOT_IN_DIR_LOC_FILE) && cmd->path != NULL)
  +if ((forbidden & NOT_IN_DIR_LOC_FILE) == NOT_IN_DIR_LOC_FILE && 
cmd->path != NULL)
return pstrcat(cmd->pool, cmd->cmd->name, gt,
   " cannot occur within  
section", NULL);
   
  -if ((forbidden & NOT_IN_LOC) && (cmd->end_token == end_location_section
  - || cmd->end_token == end_locationmatch_section))
  +if (((forbidden & NOT_IN_DIRECTORY) && (cmd->end_token == 
end_directory_section
  + || cmd->end_token == end_d

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

1998-02-21 Thread dgaudet
dgaudet 98/02/21 12:32:08

  Modified:src/main http_core.c
  Log:
  fix typo
  
  Revision  ChangesPath
  1.163 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- http_core.c   1998/02/21 01:42:39 1.162
  +++ http_core.c   1998/02/21 20:32:06 1.163
  @@ -1637,7 +1637,7 @@
   set_rlimit(cmd,&conf->limit_mem,arg,arg2,RLIMIT_AS);
   #elif defined(RLIMIT_DATA)
   set_rlimit(cmd,&conf->limit_mem,arg,arg2,RLIMIT_DATA);
  -#else defined(RLIMIT_VMEM)
  +#elif defined(RLIMIT_VMEM)
   set_rlimit(cmd,&conf->limit_mem,arg,arg2,RLIMIT_VMEM);
   #endif
   return NULL;
  
  
  


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

1998-03-13 Thread Ralf S. Engelschall
rse 98/03/13 08:54:21

  Modified:src/main http_core.c
  Log:
  Make sure the given argument to "Port" is in the appropriate range.
  
  Submitted by: Ben Hyde
  Reviewed by: Ralf S. Engelschall
  
  Revision  ChangesPath
  1.168 +9 -2  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.167
  retrieving revision 1.168
  diff -u -r1.167 -r1.168
  --- http_core.c   1998/03/13 16:49:41 1.167
  +++ http_core.c   1998/03/13 16:54:15 1.168
  @@ -1286,9 +1286,16 @@
   static const char *server_port (cmd_parms *cmd, void *dummy, char *arg)
   {
   const char *err = check_cmd_context(cmd, 
NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
  -if (err != NULL) return err;
  +int port;
   
  -cmd->server->port = atoi (arg);
  +if (err != NULL) 
  + return err;
  +port = atoi(arg);
  +if (port <= 0 || port >= 65536) /* 65536 == 1<<16 */
  + return pstrcat(cmd->temp_pool, "The port number \"", arg, 
  +"\" is outside the appropriate range (i.e. 1..65535).",
  +NULL);
  +cmd->server->port = port;
   return NULL;
   }
   
  
  
  


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

1998-03-15 Thread coar
coar98/03/14 20:39:14

  Modified:src/main http_core.c
  Log:
Un-staticate limit_setion(); mod_perl needs access to it.
  
  Revision  ChangesPath
  1.171 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.170
  retrieving revision 1.171
  diff -u -r1.170 -r1.171
  --- http_core.c   1998/03/14 00:03:37 1.170
  +++ http_core.c   1998/03/15 04:39:12 1.171
  @@ -876,7 +876,7 @@
   return NULL;
   }
   
  -static const char *limit_section (cmd_parms *cmd, void *dummy, const char 
*arg)
  +const char *limit_section (cmd_parms *cmd, void *dummy, const char *arg)
   {
   const char *limited_methods = getword(cmd->pool,&arg,'>');
   int limited = 0;
  
  
  


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

1998-03-17 Thread dgaudet
dgaudet 98/03/17 11:38:45

  Modified:src/include conf.h http_core.h
   src/main http_core.c
  Log:
  need CORE_EXPORT_NONSTD for those which are called via function pointers
  
  Revision  ChangesPath
  1.193 +5 -1  apache-1.3/src/include/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/conf.h,v
  retrieving revision 1.192
  retrieving revision 1.193
  diff -u -r1.192 -r1.193
  --- conf.h1998/03/17 13:08:54 1.192
  +++ conf.h1998/03/17 19:38:39 1.193
  @@ -759,9 +759,13 @@
   #define API_VAR_EXPORT
   #endif
   
  -/* modules should not used functions marked CORE_EXPORT */
  +/* modules should not used functions marked CORE_EXPORT
  + * or CORE_EXPORT_NONSTD */
   #ifndef CORE_EXPORT
   #define CORE_EXPORT  API_EXPORT
  +#endif
  +#ifndef CORE_EXPORT_NONSTD
  +#define CORE_EXPORT_NONSTD   API_EXPORT_NONSTD
   #endif
   
   /* So that we can use inline on some critical functions, and use
  
  
  
  1.39  +1 -1  apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- http_core.h   1998/03/17 07:54:12 1.38
  +++ http_core.h   1998/03/17 19:38:40 1.39
  @@ -242,7 +242,7 @@
   /* for mod_perl */
   CORE_EXPORT(void) add_per_dir_conf (server_rec *s, void *dir_config);
   CORE_EXPORT(void) add_per_url_conf (server_rec *s, void *url_config);
  -CORE_EXPORT(const char *) limit_section (cmd_parms *cmd, void *dummy, const 
char *arg);
  +CORE_EXPORT_NONSTD(const char *) limit_section (cmd_parms *cmd, void *dummy, 
const char *arg);
   
   #endif
   
  
  
  
  1.175 +2 -2  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.174
  retrieving revision 1.175
  diff -u -r1.174 -r1.175
  --- http_core.c   1998/03/17 08:20:57 1.174
  +++ http_core.c   1998/03/17 19:38:42 1.175
  @@ -876,7 +876,7 @@
   return NULL;
   }
   
  -CORE_EXPORT(const char *) limit_section (cmd_parms *cmd, void *dummy, const 
char *arg)
  +CORE_EXPORT_NONSTD(const char *) limit_section (cmd_parms *cmd, void *dummy, 
const char *arg)
   {
   const char *limited_methods = getword(cmd->pool,&arg,'>');
   int limited = 0;
  @@ -1864,7 +1864,7 @@
   { end_virtualhost_section, end_nested_section, NULL, RSRC_CONF, NO_ARGS, 
"Marks end of " },
   { "" },
  -{ "", endlimit_section, NULL, OR_ALL, NO_ARGS, "Marks end of 
" },
   { "" },
  
  
  


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

1998-03-26 Thread dgaudet
dgaudet 98/03/26 13:08:38

  Modified:src  CHANGES
   src/main http_core.c
  Log:
  really make the hostnamelookups default off
  
  Revision  ChangesPath
  1.735 +3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.734
  retrieving revision 1.735
  diff -u -r1.734 -r1.735
  --- CHANGES   1998/03/26 19:26:23 1.734
  +++ CHANGES   1998/03/26 21:08:35 1.735
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b6
   
  +  *) The default for HostnameLookups was changed to Off, but there
  + was a problem and it wasn't taking effect. [Dean Gaudet]
  +
 *) PORT: Clean up undefined signals on some platforms (SCO, BeOS).
[Dean Gaudet]
   
  
  
  
  1.176 +3 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.175
  retrieving revision 1.176
  diff -u -r1.175 -r1.176
  --- http_core.c   1998/03/17 19:38:42 1.175
  +++ http_core.c   1998/03/26 21:08:37 1.176
  @@ -503,6 +503,9 @@
hostname_lookups =
((core_dir_config *)get_module_config(dir_config, &core_module))
->hostname_lookups;
  + if (hostname_lookups == HOSTNAME_LOOKUP_UNSET) {
  + hostname_lookups = HOSTNAME_LOOKUP_OFF;
  + }
   } else {
/* the default */
hostname_lookups = HOSTNAME_LOOKUP_OFF;
  
  
  


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

1998-03-28 Thread dgaudet
dgaudet 98/03/28 12:57:10

  Modified:htdocs/manual/mod core.html
   src  CHANGES
   src/main http_core.c
  Log:
  "Options +Includes" wasn't corrently merged if "+IncludesNoExec"
  was defined in a parent directory.
  
  Submitted by: Lars Eilebrecht
  
  Revision  ChangesPath
  1.107 +3 -0  apache-1.3/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/core.html,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- core.html 1998/03/21 22:31:53 1.106
  +++ core.html 1998/03/28 20:57:04 1.107
  @@ -1818,6 +1818,9 @@
   then the options FollowSymLinks and Includes
   are set for the /web/docs/spec directory.
   
  +Note: Using -IncludesNOEXEC or 
-Includes
  +disables server-side includes completely regardless of the previous 
setting.
  +
   The default in the absence of any other settings is All.
   
   
  
  
  
  1.743 +3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.742
  retrieving revision 1.743
  diff -u -r1.742 -r1.743
  --- CHANGES   1998/03/28 12:06:52 1.742
  +++ CHANGES   1998/03/28 20:57:07 1.743
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b6
   
  +  *) "Options +Includes" wasn't corrently merged if "+IncludesNoExec"
  + was defined in a parent directory. [Lars Eilebrecht]
  +
 *) API: ap_snprintf() code mutated into apapi_vformatter(), which is
a generic printf-style routine that can call arbitrary output
routines.  Use this to replace http_bprintf.c.  Add new routines
  
  
  
  1.179 +2 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.178
  retrieving revision 1.179
  diff -u -r1.178 -r1.179
  --- http_core.c   1998/03/28 11:58:23 1.178
  +++ http_core.c   1998/03/28 20:57:10 1.179
  @@ -166,6 +166,8 @@
conf->opts_add = (conf->opts_add & ~new->opts_remove) | new->opts_add;
conf->opts_remove = (conf->opts_remove & ~new->opts_add) | 
new->opts_remove;
conf->opts = (conf->opts & ~conf->opts_remove) | conf->opts_add;
  +if ((base->opts & OPT_INCNOEXEC) && (new->opts & OPT_INCLUDES))
  +  conf->opts = (conf->opts & ~OPT_INCNOEXEC) | OPT_INCLUDES;
   }
   else {
/* otherwise we just copy, because an explicit opts setting
  
  
  


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

1998-04-18 Thread rse
rse 98/04/18 04:53:35

  Modified:src/main http_core.c
  Log:
  Give the AddModule directive a more useful error message.
  
  Revision  ChangesPath
  1.184 +4 -3  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.183
  retrieving revision 1.184
  diff -u -r1.183 -r1.184
  --- http_core.c   1998/04/13 18:05:11 1.183
  +++ http_core.c   1998/04/18 11:53:35 1.184
  @@ -1244,9 +1244,10 @@
   const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) return err;
   
  -if (ap_add_named_module (arg))
  -return NULL;
  -return "required module not found";
  +if (!ap_add_named_module(arg))
  + return ap_pstrcat(cmd->pool, "Cannot add module via name '", arg, 
  +   "': not in list of loaded modules", NULL);
  +return NULL;
   }
   
   static const char *clear_module_list_command (cmd_parms *cmd, void *dummy)
  
  
  


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

1998-04-18 Thread marc
marc98/04/18 14:38:00

  Modified:src  CHANGES
   src/main http_core.c
  Log:
  If an explict handler is set for a file yet we end up in the default
  handler anyway, something went wrong somewhere so we should tell
  people about it.  The old behaviour was silently processing the
  request with the default handler, giving the user no warning that
  their configuration to use a specific handler is being ignored.
  
  Reviewed by:  Ben Laurie, Dean Gaudet, Martin Kraemer
  
  Revision  ChangesPath
  1.773 +5 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.772
  retrieving revision 1.773
  diff -u -r1.772 -r1.773
  --- CHANGES   1998/04/18 10:54:54 1.772
  +++ CHANGES   1998/04/18 21:37:54 1.773
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3b7
   
  +  *) If a specific handler is set for a file yet the request still
  + ends up being handled by the default handler, log an error
  + message before handling it.  This catches things such as trying 
  + to use SSIs without mod_include enabled.  [Marc Slemko]
  +
 *) Fix error logging for the startup case where ap_log_error() still uses
stderr as the target. Now the default log level is honored here, too.
[Ralf S. Engelschall]
  
  
  
  1.185 +6 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.184
  retrieving revision 1.185
  diff -u -r1.184 -r1.185
  --- http_core.c   1998/04/18 11:53:35 1.184
  +++ http_core.c   1998/04/18 21:37:58 1.185
  @@ -2049,6 +2049,12 @@
   caddr_t mm;
   #endif
   
  +if (r->handler) {
  + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING,
  + r->server, "handler \"%s\" not found, using default "
  + "handler for: %s", r->handler, r->filename);
  +}
  +
   /* This handler has no use for a request body (yet), but we still
* need to read and discard it if the client sent one.
*/
  
  
  


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

1998-04-23 Thread martin
martin  98/04/23 09:06:08

  Modified:src/main http_core.c
  Log:
  Fix CoreDumpDirectory directive to work server_root_relative
  
  Revision  ChangesPath
  1.187 +1 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.186
  retrieving revision 1.187
  diff -u -u -r1.186 -r1.187
  --- http_core.c   1998/04/19 20:10:46 1.186
  +++ http_core.c   1998/04/23 16:06:07 1.187
  @@ -1770,6 +1770,7 @@
   const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) return err;
   
  +arg = ap_server_root_relative(cmd->pool, arg);
   if ((stat(arg, &finfo) == -1) || !S_ISDIR(finfo.st_mode)) {
return ap_pstrcat(cmd->pool, "CoreDumpDirectory ", arg, 
" does not exist or is not a directory", NULL);
  
  
  


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

1998-05-03 Thread ben
ben 98/05/03 03:37:07

  Modified:src/main http_core.c
  Log:
  Complain if we have more than 64 threads in Win32.
  
  Revision  ChangesPath
  1.190 +5 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.189
  retrieving revision 1.190
  diff -u -r1.189 -r1.190
  --- http_core.c   1998/05/02 23:25:46 1.189
  +++ http_core.c   1998/05/03 10:37:06 1.190
  @@ -1599,6 +1599,11 @@
   if (err != NULL) return err;
   
   ap_threads_per_child = atoi (arg);
  +#ifdef WIN32
  +if(ap_threads_per_child > 64)
  + return "Can't have more than 64 threads in Windows (for now)";
  +#endif
  +
   return NULL;
   }
   
  
  
  


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

1998-05-05 Thread brian
brian   98/05/04 21:48:06

  Modified:src/modules/standard mod_log_config.c mod_rewrite.c
mod_status.c
   src/main http_core.c
  Log:
  Hi,
  
  the patch makes mod_rewrite, mod_log_config, mod_status and
  the ServerSignature feature compatible with 'UseCanonicalName off'
  by changing  r->server->server_hostname to ap_get_server_name().
  
  And I changed some functions which use r->server->port to
  use ap_get_server_port() instead, because if there's no Port directive
  in the config r->server->port is 0.
  
  ciao...
  --
  Lars Eilebrecht- Reality has always been to small
  [EMAIL PROTECTED] - for human imagination.
  http://www.home.unix-ag.org/sfx/
  
  Revision  ChangesPath
  1.56  +2 -2  apache-1.3/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- mod_log_config.c  1998/04/29 23:46:03 1.55
  +++ mod_log_config.c  1998/05/05 04:47:58 1.56
  @@ -404,12 +404,12 @@
*/
   static char *log_virtual_host(request_rec *r, char *a)
   {
  -return ap_pstrdup(r->pool, r->server->server_hostname);
  +return ap_pstrdup(r->pool, ap_get_server_name(r));
   }
   
   static char *log_server_port(request_rec *r, char *a)
   {
  -return ap_psprintf(r->pool, "%u", r->server->port);
  +return ap_psprintf(r->pool, "%u", ap_get_server_port(r));
   }
   
   static char *log_child_pid(request_rec *r, char *a)
  
  
  
  1.102 +12 -9 apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- mod_rewrite.c 1998/04/11 12:00:50 1.101
  +++ mod_rewrite.c 1998/05/05 04:47:59 1.102
  @@ -998,11 +998,12 @@
*/
   
   /* add the canonical URI of this URL */
  -thisserver = r->server->server_hostname;
  -if (is_default_port(r->server->port, r))
  +thisserver = (char *) ap_get_server_name(r);
  +thisport = (char *) ap_get_server_port(r);
  +if (is_default_port((int) thisport, r))
   thisport = "";
   else {
  -ap_snprintf(buf, sizeof(buf), ":%u", r->server->port);
  +ap_snprintf(buf, sizeof(buf), ":%u", thisport);
   thisport = buf;
   }
   thisurl = ap_table_get(r->subprocess_env, ENVVAR_SCRIPT_URL);
  @@ -2249,25 +2250,27 @@
   {
   int i;
   char port[32];
  +char *thisport;
   
   i = strlen(r->filename);
   if (!(   (i > 7 && strncasecmp(r->filename, "http://";, 7)   == 0)
 || (i > 8 && strncasecmp(r->filename, "https://";, 8)  == 0)
 || (i > 9 && strncasecmp(r->filename, "gopher://";, 9) == 0)
 || (i > 6 && strncasecmp(r->filename, "ftp://";, 6)== 0))) {
  -
  -if (is_default_port(r->server->port,r))
  +  
  +thisport = (char *) ap_get_server_port(r);
  +if (is_default_port((int) thisport,r))
   port[0] = '\0';
   else
  -ap_snprintf(port, sizeof(port), ":%u", r->server->port);
  +ap_snprintf(port, sizeof(port), ":%u", thisport);
   
   if (r->filename[0] == '/')
   r->filename = ap_psprintf(r->pool, "%s://%s%s%s",
  -http_method(r), r->server->server_hostname,
  +http_method(r), ap_get_server_name(r),
   port, r->filename);
   else
   r->filename = ap_psprintf(r->pool, "%s://%s%s/%s",
  -http_method(r), r->server->server_hostname,
  +http_method(r), ap_get_server_name(r),
   port, r->filename);
   }
   return;
  @@ -2960,7 +2963,7 @@
   
   ap_snprintf(str3, sizeof(str3),
   "%s %s [%s/sid#%lx][rid#%lx/%s%s] (%d) %s\n", str1,
  -current_logtime(r), r->server->server_hostname,
  +current_logtime(r), ap_get_server_name(r),
   (unsigned long)(r->server), (unsigned long)r,
   type, redir, level, str2);
   
  
  
  
  1.86  +1 -2  apache-1.3/src/modules/standard/mod_status.c
  
  Index: mod_status.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_status.c,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- mod_status.c  1998/04/11 12:00:51 1.85
  +++ mod_status.c  1998/05/05 04:47:59 1.86
  @@ -234,7 +234,6 @@
   #endif /* STATUS */
   int short_report = 0;

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

1998-05-07 Thread dougm
dougm   98/05/07 15:42:06

  Modified:src/main http_core.c
  Log:
  `bool' is #define'd as a type here, can't build with that clash,
  so change to `flag'
  
  Revision  ChangesPath
  1.195 +2 -2  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.194
  retrieving revision 1.195
  diff -u -r1.194 -r1.195
  --- http_core.c   1998/05/07 12:24:25 1.194
  +++ http_core.c   1998/05/07 22:42:05 1.195
  @@ -1892,9 +1892,9 @@
*/
   
   static const char *enable_platform_announcement(cmd_parms *cmd, void 
*mconfig,
  - int bool)
  + int flag)
   {
  -ap_note_platform = bool;
  +ap_note_platform = flag;
   return NULL;
   }
   
  
  
  


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

1998-05-08 Thread martin
martin  98/05/08 04:27:52

  Modified:src/main http_core.c
  Log:
  AddVersionPlatform sets a global variable. Enforce GLOBAL context
  
  Revision  ChangesPath
  1.196 +3 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.195
  retrieving revision 1.196
  diff -u -u -r1.195 -r1.196
  --- http_core.c   1998/05/07 22:42:05 1.195
  +++ http_core.c   1998/05/08 11:27:51 1.196
  @@ -1894,6 +1894,9 @@
   static const char *enable_platform_announcement(cmd_parms *cmd, void 
*mconfig,
int flag)
   {
  +const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  +if (err != NULL) return err;
  +
   ap_note_platform = flag;
   return NULL;
   }
  
  
  


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

1998-05-08 Thread coar
coar98/05/08 16:41:34

  Modified:src  CHANGES
   src/main http_core.c
  Log:
Back out the AddVersionComponent run-time configuration
directive.
  
  Revision  ChangesPath
  1.835 +7 -7  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.834
  retrieving revision 1.835
  diff -u -r1.834 -r1.835
  --- CHANGES   1998/05/08 07:50:19 1.834
  +++ CHANGES   1998/05/08 23:41:32 1.835
  @@ -28,13 +28,13 @@
  Makefille. and directories src.
[Ralf S. Engelschall]
   
  -  *) Added the AddVersionComponent and AddVersionPlatform core directives.
  - The first allows the addition of arbitrary text to the Server-Version
  - response header field value, augmenting the SERVER_SUBVERSION define in
  - the Configuration file with run-time settings (more useful in
  - a loadable-module environment).  AddVersionPlatform inserts a comment
  - such as "(UNIX)" or "(Win32)" into the server version string.
  - [Ken Coar] PR#2056
  +  *) Added the ap_add_version_component() API routine and the
  + AddVersionPlatform core directive.  The first allows modules to
  + declare themselves in the Server response header field value,
  + augmenting the SERVER_SUBVERSION define in the Configuration file
  + with run-time settings (more useful in a loadable-module environment).
  + AddVersionPlatform inserts a comment such as "(UNIX)" or "(Win32)"
  + into the server version string.  [Ken Coar] PR#2056
   
 *) Minor stability tweaks to avoid core dumps in ap_snprintf.
[Martin Kraemer]
  
  
  
  1.197 +1 -15 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.196
  retrieving revision 1.197
  diff -u -r1.196 -r1.197
  --- http_core.c   1998/05/08 11:27:51 1.196
  +++ http_core.c   1998/05/08 23:41:34 1.197
  @@ -1872,18 +1872,6 @@
   #endif /*_OSD_POSIX*/
   
   /*
  - * Handle a request to add an arbitrary string to the Server-Version response
  - * header field (the AddVersionComponent directive).
  - */
  -
  -static const char *add_version_component(cmd_parms *cmd, void *mconfig, 
  -  char *word1)
  -{
  -ap_add_version_component((const char *)word1);
  -return NULL;
  -}
  -
  -/*
* Handle a request to include the server's OS platform in the Server-Version
* response header field (the AddVersionPlatform directive).  Unfortunately
* this requires a new global in order to communicate the setting back to
  @@ -2038,10 +2026,8 @@
   { "BS2000AuthFile", set_bs2000_authfile, NULL, RSRC_CONF, TAKE1,
 "server User's bs2000 logon password file (read-protected)" },
   #endif
  -{ "AddVersionComponent", add_version_component, NULL, RSRC_CONF, TAKE1,
  -  "String to be added to the Server-Version text" },
   { "AddVersionPlatform", enable_platform_announcement, NULL, RSRC_CONF, FLAG,
  -  "Set to 'on' to include server OS platform in Server-Version text" },
  +  "Set to 'off' to not include server OS platform in Server identity text" },
   { NULL },
   };
   
  
  
  


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

1998-05-25 Thread dgaudet
dgaudet 98/05/25 16:37:46

  Modified:src/main http_core.c
  Log:
  another style tweak
  
  Revision  ChangesPath
  1.201 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.200
  retrieving revision 1.201
  diff -u -r1.200 -r1.201
  --- http_core.c   1998/05/11 20:08:08 1.200
  +++ http_core.c   1998/05/25 23:37:45 1.201
  @@ -710,7 +710,7 @@
   const char *err = ap_check_cmd_context(cmd, 
NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
   if (err != NULL) return err;
   
  -arg=ap_os_canonical_filename (cmd->pool, arg);
  +arg = ap_os_canonical_filename(cmd->pool, arg);
   if (!ap_is_directory (arg)) {
if (cmd->server->is_virtual) {
fprintf (stderr, "Warning: DocumentRoot [%s] does not exist\n", 
arg);
  
  
  


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

1998-05-28 Thread jim
jim 98/05/28 08:28:14

  Modified:src/main http_core.c
  Log:
  Oops... it's called ServerTokens now
  
  Revision  ChangesPath
  1.203 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.202
  retrieving revision 1.203
  diff -u -r1.202 -r1.203
  --- http_core.c   1998/05/27 14:01:33 1.202
  +++ http_core.c   1998/05/28 15:28:13 1.203
  @@ -1873,7 +1873,7 @@
   
   /*
* Handle a request to include the server's OS platform in the Server
  - * response header field (the AddVersionPlatform directive).  Unfortunately
  + * response header field (the ServerTokens directive).  Unfortunately
* this requires a new global in order to communicate the setting back to
* http_main so it can insert the information in the right place in the
* string.
  
  
  


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

1998-07-03 Thread coar
coar98/07/03 09:47:30

  Modified:src/main http_core.c
  Log:
Cosmetic style-guide cleanup.  I'm about halfway through, but
chickened out when I saw how much had already accumulated..
No thirty.
  
  Revision  ChangesPath
  1.206 +796 -467  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.205
  retrieving revision 1.206
  diff -u -r1.205 -r1.206
  --- http_core.c   1998/07/01 21:19:53 1.205
  +++ http_core.c   1998/07/03 16:47:29 1.206
  @@ -104,17 +104,23 @@
* the http_conf_globals.
*/
   
  -static void *create_core_dir_config (pool *a, char *dir)
  +static void *create_core_dir_config(pool *a, char *dir)
   {
  -core_dir_config *conf =
  -  (core_dir_config *)ap_pcalloc(a, sizeof(core_dir_config));
  -  
  -if (!dir || dir[strlen(dir) - 1] == '/') conf->d = dir;
  -else if (strncmp(dir,"proxy:",6)==0) conf->d = ap_pstrdup (a, dir);
  -else conf->d = ap_pstrcat (a, dir, "/", NULL);
  -conf->d_is_fnmatch = conf->d ? (ap_is_fnmatch (conf->d) != 0) : 0;
  -conf->d_components = conf->d ? ap_count_dirs (conf->d) : 0;
  +core_dir_config *conf;
   
  +conf = (core_dir_config *)ap_pcalloc(a, sizeof(core_dir_config));
  +if (!dir || dir[strlen(dir) - 1] == '/') {
  +conf->d = dir;
  +}
  +else if (strncmp(dir, "proxy:", 6) == 0) {
  +conf->d = ap_pstrdup(a, dir);
  +}
  +else {
  +conf->d = ap_pstrcat(a, dir, "/", NULL);
  +}
  +conf->d_is_fnmatch = conf->d ? (ap_is_fnmatch(conf->d) != 0) : 0;
  +conf->d_components = conf->d ? ap_count_dirs(conf->d) : 0;
  +
   conf->opts = dir ? OPT_UNSET : OPT_UNSET|OPT_ALL;
   conf->opts_add = conf->opts_remove = OPT_NONE;
   conf->override = dir ? OR_UNSET : OR_UNSET|OR_ALL;
  @@ -124,7 +130,7 @@
   conf->use_canonical_name = 1 | 2;/* 2 = unset, default on */
   
   conf->hostname_lookups = HOSTNAME_LOOKUP_UNSET;
  -conf->do_rfc1413 = DEFAULT_RFC1413 | 2;  /* set bit 1 to indicate 
default */
  +conf->do_rfc1413 = DEFAULT_RFC1413 | 2; /* set bit 1 to indicate default 
*/
   conf->satisfy = SATISFY_NOSPEC;
   
   #ifdef RLIMIT_CPU
  @@ -137,25 +143,26 @@
   conf->limit_nproc = NULL;
   #endif
   
  -conf->sec = ap_make_array (a, 2, sizeof(void *));
  +conf->sec = ap_make_array(a, 2, sizeof(void *));
   
   return (void *)conf;
   }
   
  -static void *merge_core_dir_configs (pool *a, void *basev, void *newv)
  +static void *merge_core_dir_configs(pool *a, void *basev, void *newv)
   {
   core_dir_config *base = (core_dir_config *)basev;
   core_dir_config *new = (core_dir_config *)newv;
  -core_dir_config *conf =
  -  (core_dir_config *)ap_palloc (a, sizeof(core_dir_config));
  +core_dir_config *conf;
   int i;
 
  -memcpy ((char *)conf, (const char *)base, sizeof(core_dir_config));
  -if( base->response_code_strings ) {
  - conf->response_code_strings = ap_palloc(a,
  - sizeof(*conf->response_code_strings) * RESPONSE_CODES );
  - memcpy( conf->response_code_strings, base->response_code_strings,
  - sizeof(*conf->response_code_strings) * RESPONSE_CODES );
  +conf = (core_dir_config *)ap_palloc(a, sizeof(core_dir_config));
  +memcpy((char *)conf, (const char *)base, sizeof(core_dir_config));
  +if (base->response_code_strings) {
  + conf->response_code_strings =
  + ap_palloc(a, sizeof(*conf->response_code_strings)
  +   * RESPONSE_CODES);
  + memcpy(conf->response_code_strings, base->response_code_strings,
  +sizeof(*conf->response_code_strings) * RESPONSE_CODES);
   }
   
   conf->d = new->d;
  @@ -168,10 +175,12 @@
 * preserve the invariant (opts_add & opts_remove) == 0
 */
conf->opts_add = (conf->opts_add & ~new->opts_remove) | new->opts_add;
  - conf->opts_remove = (conf->opts_remove & ~new->opts_add) | 
new->opts_remove;
  + conf->opts_remove = (conf->opts_remove & ~new->opts_add)
  + | new->opts_remove;
conf->opts = (conf->opts & ~conf->opts_remove) | conf->opts_add;
  -if ((base->opts & OPT_INCNOEXEC) && (new->opts & OPT_INCLUDES))
  -  conf->opts = (conf->opts & ~OPT_INCNOEXEC) | OPT_INCLUDES;
  +if ((base->opts & OPT_INCNOEXEC) && (new->opts & OPT_INCLUDES)) {
  +conf->opts = (conf->opts & ~OPT_INCNOEXEC) | OPT_INCLUDES;
  + }
   }
   else {
/* otherwise we just copy, because an explicit opts setting
  @@ -182,75 +191,105 @@
conf->opts_remove = new->opts_remove;
   }
   
  -if (!(new->override & OR_UNSET)) conf->override = new->override;
  -if (new->ap_default_type) conf->ap_default_type = new->ap_default_type;
  +if (!(new->ove

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

1998-07-03 Thread coar
coar98/07/03 13:06:02

  Modified:src  CHANGES
   src/main http_core.c
  Log:
Fix  parsing; "GET" and "get" are distinct methods.
  
  Revision  ChangesPath
  1.944 +3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.943
  retrieving revision 1.944
  diff -u -r1.943 -r1.944
  --- CHANGES   1998/07/01 18:18:23 1.943
  +++ CHANGES   1998/07/03 20:05:58 1.944
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.1
   
  +  *) The  parsing routine was incorrectly treating methods in
  + a case-insensitive way.  [Ken Coar]
  +
 *) The ap_bprintf() code neglected to test if there was an error on
the connection.  ap_bflush() misdiagnosed a failure as a success.
[Dean Gaudet]
  
  
  
  1.207 +9 -8  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.206
  retrieving revision 1.207
  diff -u -r1.206 -r1.207
  --- http_core.c   1998/07/03 16:47:29 1.206
  +++ http_core.c   1998/07/03 20:06:00 1.207
  @@ -1019,27 +1019,28 @@
*/
   
   while (limited_methods[0]) {
  -char *method = ap_getword_conf (cmd->pool, &limited_methods);
  - if (!strcasecmp(method, "GET")) {
  +char *method = ap_getword_conf(cmd->pool, &limited_methods);
  + if (!strcmp(method, "GET")) {
limited |= (1 << M_GET);
}
  - else if (!strcasecmp(method, "PUT")) {
  + else if (!strcmp(method, "PUT")) {
limited |= (1 << M_PUT);
}
  - else if (!strcasecmp(method, "POST")) {
  + else if (!strcmp(method, "POST")) {
limited |= (1 << M_POST);
}
  - else if (!strcasecmp(method, "DELETE")) {
  + else if (!strcmp(method, "DELETE")) {
limited |= (1 << M_DELETE);
}
  -else if (!strcasecmp(method, "CONNECT")) {
  +else if (!strcmp(method, "CONNECT")) {
limited |= (1 << M_CONNECT);
}
  - else if (!strcasecmp(method, "OPTIONS")) {
  + else if (!strcmp(method, "OPTIONS")) {
limited |= (1 << M_OPTIONS);
}
else {
  - return "unknown method in ";
  + return ap_pstrcat(cmd->pool, "unknown method \"",
  +   method, "\" in ", NULL);
}
   }
   
  
  
  


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

1998-07-03 Thread coar
coar98/07/03 15:15:57

  Modified:src/main http_core.c
  Log:
More cosmetic cleanups..  There's still more to do, but I'm
kinda tired.  Maybe I will and maybe I won't..
  
  Revision  ChangesPath
  1.208 +264 -187  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.207
  retrieving revision 1.208
  diff -u -r1.207 -r1.208
  --- http_core.c   1998/07/03 20:06:00 1.207
  +++ http_core.c   1998/07/03 22:15:56 1.208
  @@ -214,7 +214,8 @@
sizeof(*conf->response_code_strings) * RESPONSE_CODES);
memcpy(conf->response_code_strings, new->response_code_strings,
   sizeof(*conf->response_code_strings) * RESPONSE_CODES);
  - } else {
  + }
  + else {
for (i = 0; i < RESPONSE_CODES; ++i) {
if (new->response_code_strings[i] != NULL) {
conf->response_code_strings[i]
  @@ -401,7 +402,7 @@
   elts = (void **)sec->elts;
   
   /* build our sorting space */
  -sortbin = ap_palloc(p, sec->nelts * sizeof (*sortbin));
  +sortbin = ap_palloc(p, sec->nelts * sizeof(*sortbin));
   for (i = 0; i < nelts; ++i) {
sortbin[i].orig_index = i;
sortbin[i].elt = elts[i];
  @@ -410,7 +411,7 @@
   qsort(sortbin, nelts, sizeof(*sortbin), reorder_sorter);
   
   /* and now build a new array */
  -sec = ap_make_array(p, nelts, sizeof (void *));
  +sec = ap_make_array(p, nelts, sizeof(void *));
   for (i = 0; i < nelts; ++i) {
*(void **)ap_push_array(sec) = sortbin[i].elt;
   }
  @@ -426,7 +427,7 @@
* here...
*/
   
  -API_EXPORT(int) ap_allow_options (request_rec *r)
  +API_EXPORT(int) ap_allow_options(request_rec *r)
   {
   core_dir_config *conf = 
 (core_dir_config *)ap_get_module_config(r->per_dir_config, 
&core_module); 
  @@ -566,7 +567,8 @@
if (hostname_lookups == HOSTNAME_LOOKUP_UNSET) {
hostname_lookups = HOSTNAME_LOOKUP_OFF;
}
  -} else {
  +}
  +else {
/* the default */
hostname_lookups = HOSTNAME_LOOKUP_OFF;
   }
  @@ -586,7 +588,7 @@
ap_str_tolower(conn->remote_host);
   
if (hostname_lookups == HOSTNAME_LOOKUP_DOUBLE) {
  - do_double_reverse (conn);
  + do_double_reverse(conn);
if (conn->double_reverse != 1) {
conn->remote_host = NULL;
}
  @@ -598,7 +600,7 @@
}
   }
   if (type == REMOTE_DOUBLE_REV) {
  - do_double_reverse (conn);
  + do_double_reverse(conn);
if (conn->double_reverse == -1) {
return NULL;
}
  @@ -770,7 +772,7 @@
   return NULL;
   }
   
  -static const char *set_access_name (cmd_parms *cmd, void *dummy, char *arg)
  +static const char *set_access_name(cmd_parms *cmd, void *dummy, char *arg)
   {
   void *sconf = cmd->server->module_config;
   core_server_config *conf = ap_get_module_config(sconf, &core_module);
  @@ -785,7 +787,7 @@
   return NULL;
   }
   
  -static const char *set_document_root (cmd_parms *cmd, void *dummy, char *arg)
  +static const char *set_document_root(cmd_parms *cmd, void *dummy, char *arg)
   {
   void *sconf = cmd->server->module_config;
   core_server_config *conf = ap_get_module_config(sconf, &core_module);
  @@ -797,7 +799,7 @@
   }
   
   arg = ap_os_canonical_filename(cmd->pool, arg);
  -if (!ap_is_directory (arg)) {
  +if (!ap_is_directory(arg)) {
if (cmd->server->is_virtual) {
fprintf(stderr, "Warning: DocumentRoot [%s] does not exist\n",
arg);
  @@ -811,8 +813,8 @@
   return NULL;
   }
   
  -static const char *set_error_document (cmd_parms *cmd, core_dir_config *conf,
  -char *line)
  +static const char *set_error_document(cmd_parms *cmd, core_dir_config *conf,
  +   char *line)
   {
   int error_number, index_number, idx500;
   char *w;
  @@ -953,7 +955,7 @@
opt = OPT_ALL;
}
else {
  - return ap_pstrcat (cmd->pool, "Illegal option ", w, NULL);
  + return ap_pstrcat(cmd->pool, "Illegal option ", w, NULL);
}
   
/* we ensure the invariant (d->opts_add & d->opts_remove) == 0 */
  @@ -1005,7 +1007,7 @@
   CORE_EXPORT_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void 
*dummy,
  const char *arg)
   {
  -const char *limited_methods = ap_getword(cmd->pool,&arg,'>');
  +const char *limited_methods = ap_getword(cmd->pool, &arg, '>');
   int limited = 0;
 
   const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
  @@ -1048,7 +1050,7 @@
   return NULL;
   }
   
  -static cons

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

1998-07-10 Thread marc
marc98/07/09 22:44:46

  Modified:src/main http_core.c
  Log:
  Warn that StartServers does nothing on Win32 instead of just ignoring
  it.
  
  Revision  ChangesPath
  1.210 +4 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.209
  retrieving revision 1.210
  diff -u -r1.209 -r1.210
  --- http_core.c   1998/07/07 04:06:21 1.209
  +++ http_core.c   1998/07/10 05:44:46 1.210
  @@ -1853,12 +1853,16 @@
   
   static const char *set_daemons_to_start(cmd_parms *cmd, void *dummy, char 
*arg) 
   {
  +#ifdef WIN32
  +fprintf(stderr, "WARNING: StartServers has no effect on Win32\n");
  +#else
   const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) {
   return err;
   }
   
   ap_daemons_to_start = atoi(arg);
  +#endif
   return NULL;
   }
   
  
  
  


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

1998-07-13 Thread marc
marc98/07/12 19:44:26

  Modified:src/main http_core.c
  Log:
  Canonicalize ServerRoot _before_ checking if it is a directory.
  Fixes problem where paths without a directory were rejected with
  a horrible error on Win32.
  
  Revision  ChangesPath
  1.211 +4 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.210
  retrieving revision 1.211
  diff -u -r1.210 -r1.211
  --- http_core.c   1998/07/10 05:44:46 1.210
  +++ http_core.c   1998/07/13 02:44:24 1.211
  @@ -1680,14 +1680,17 @@
   static const char *set_server_root(cmd_parms *cmd, void *dummy, char *arg) 
   {
   const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  +
   if (err != NULL) {
   return err;
   }
   
  +arg = ap_os_canonical_filename(cmd->pool, arg);
  +
   if (!ap_is_directory(arg)) {
   return "ServerRoot must be a valid directory";
   }
  -ap_cpystrn(ap_server_root, ap_os_canonical_filename(cmd->pool, arg),
  +ap_cpystrn(ap_server_root, arg,
   sizeof(ap_server_root));
   return NULL;
   }
  
  
  


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

1998-07-23 Thread coar
coar98/07/23 03:46:25

  Modified:src/main http_core.c
  Log:
Add a comment explaining the initially astonishing use of '!='
in what otherwise looks like it should be a string comparison.
  
  Revision  ChangesPath
  1.213 +9 -3  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.212
  retrieving revision 1.213
  diff -u -r1.212 -r1.213
  --- http_core.c   1998/07/13 11:32:39 1.212
  +++ http_core.c   1998/07/23 10:46:23 1.213
  @@ -1087,12 +1087,18 @@
   static const char *end_nested_section(cmd_parms *cmd, void *dummy)
   {
   if (cmd->end_token == NULL) {
  - return ap_pstrcat(cmd->pool, cmd->cmd->name,
  - " without matching <", cmd->cmd->name + 2, " section", NULL);
  +return ap_pstrcat(cmd->pool, cmd->cmd->name,
  +   " without matching <", cmd->cmd->name + 2, 
  +   " section", NULL);
   }
  +/*
  + * This '!=' may look weird on a string comparison, but it's correct --
  + * it's been set up so that checking for two pointers to the same datum
  + * is valid here.  And faster.
  + */
   if (cmd->cmd->name != cmd->end_token) {
return ap_pstrcat(cmd->pool, "Expected ", cmd->end_token, " but saw ",
  - cmd->cmd->name, NULL);
  +   cmd->cmd->name, NULL);
   }
   return cmd->end_token;
   }
  
  
  


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

1998-08-05 Thread marc
marc98/08/05 11:52:51

  Modified:src/main http_core.c
  Log:
  Fix src/httpd.h --> src/include/httpd.h path in error message that
  wasn't updated.
  
  Revision  ChangesPath
  1.215 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.214
  retrieving revision 1.215
  diff -u -r1.214 -r1.215
  --- http_core.c   1998/08/03 09:14:52 1.214
  +++ http_core.c   1998/08/05 18:52:50 1.215
  @@ -1917,7 +1917,7 @@
  "of %d servers,\n", ap_daemons_limit, HARD_SERVER_LIMIT);
  fprintf(stderr, " lowering MaxClients to %d.  To increase, please "
  "see the\n", HARD_SERVER_LIMIT);
  -   fprintf(stderr, " HARD_SERVER_LIMIT define in src/httpd.h.\n");
  +   fprintf(stderr, " HARD_SERVER_LIMIT define in 
src/include/httpd.h.\n");
  ap_daemons_limit = HARD_SERVER_LIMIT;
   } 
   else if (ap_daemons_limit < 1) {
  
  
  


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

1998-08-06 Thread dougm
dougm   98/08/06 12:23:47

  Modified:src  CHANGES
   src/include http_core.h
   src/main http_core.c
  Log:
   API: new ap_custom_response() function for hooking into the
   ErrorDocument mechanism at runtime
  Submitted by: Doug MacEachern
  Reviewed by:  Ralf
  
  Revision  ChangesPath
  1.1008+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1007
  retrieving revision 1.1008
  diff -u -r1.1007 -r1.1008
  --- CHANGES   1998/08/06 19:13:50 1.1007
  +++ CHANGES   1998/08/06 19:23:41 1.1008
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.2
   
  +  *) API: new ap_custom_response() function for hooking into the
  + ErrorDocument mechanism at runtime [Doug MacEachern]
  +
 *) API: new ap_uuencode() function [Doug MacEachern]
   
 *) API: scan_script_header_err_core() now "public" and renamed
  
  
  
  1.46  +2 -1  apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- http_core.h   1998/08/06 17:30:24 1.45
  +++ http_core.h   1998/08/06 19:23:43 1.46
  @@ -131,7 +131,8 @@
   API_EXPORT(char *) ap_construct_url(pool *p, const char *uri, const 
request_rec *r);
   API_EXPORT(const char *) ap_get_server_name(const request_rec *r);
   API_EXPORT(unsigned) ap_get_server_port(const request_rec *r);
  - 
  +API_EXPORT(void) ap_custom_response(request_rec *r, int status, char 
*string);
  +
   /* Authentication stuff.  This is one of the places where compatibility
* with the old config files *really* hurts; they don't discriminate at
* all between different authentication schemes, meaning that we need
  
  
  
  1.217 +20 -0 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.216
  retrieving revision 1.217
  diff -u -r1.216 -r1.217
  --- http_core.c   1998/08/06 17:30:28 1.216
  +++ http_core.c   1998/08/06 19:23:46 1.217
  @@ -813,6 +813,26 @@
   return NULL;
   }
   
  +API_EXPORT(void) ap_custom_response(request_rec *r, int status, char *string)
  +{
  +core_dir_config *conf = 
  + ap_get_module_config(r->per_dir_config, &core_module);
  +int idx;
  +
  +if(conf->response_code_strings == NULL) {
  +conf->response_code_strings = 
  + ap_pcalloc(r->pool,
  + sizeof(*conf->response_code_strings) * 
  + RESPONSE_CODES);
  +}
  +
  +idx = ap_index_of_response(status);
  +
  +conf->response_code_strings[idx] = 
  +   ((ap_is_url(string) || (*string == '/')) && (*string != '"')) ? 
  +   ap_pstrdup(r->pool, string) : ap_pstrcat(r->pool, "\"", string, NULL);
  +}
  +
   static const char *set_error_document(cmd_parms *cmd, core_dir_config *conf,
  char *line)
   {
  
  
  


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

1998-08-10 Thread jim
jim 98/08/10 07:37:07

  Modified:src/main http_core.c
  Log:
  Some cleanups for limit_req_body
  
  Revision  ChangesPath
  1.220 +8 -2  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.219
  retrieving revision 1.220
  diff -u -r1.219 -r1.220
  --- http_core.c   1998/08/10 04:16:14 1.219
  +++ http_core.c   1998/08/10 14:37:06 1.220
  @@ -143,6 +143,7 @@
   conf->limit_nproc = NULL;
   #endif
   
  +conf->limit_req_body = 0;
   conf->sec = ap_make_array(a, 2, sizeof(void *));
   
   return (void *)conf;
  @@ -253,6 +254,9 @@
   }
   #endif
   
  +if (new->limit_req_body) {
  +conf->limit_req_body = new->limit_req_body;
  +}
   conf->sec = ap_append_arrays(a, base->sec, new->sec);
   
   if (new->satisfy != SATISFY_NOSPEC) {
  @@ -2527,8 +2531,10 @@
   #endif
   { "ServerTokens", set_serv_tokens, NULL, RSRC_CONF, TAKE1,
 "Determine tokens displayed in the Server: header - Min(imal), OS or Full" 
},
  -{ "LimitRequestBody", set_limit_req_body, NULL, RSRC_CONF|ACCESS_CONF|OR_ALL,
  -  TAKE1, "Limit (in bytes) on maximum size of request message body" },
  +{ "LimitRequestBody", set_limit_req_body,
  +  (void*)XtOffsetOf(core_dir_config, limit_req_body),
  +  RSRC_CONF|ACCESS_CONF|OR_ALL, TAKE1,
  +  "Limit (in bytes) on maximum size of request message body" },
   { NULL },
   };
   
  
  
  


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

1998-08-11 Thread brian
brian   98/08/10 19:50:55

  Modified:src/main http_core.c
  Log:
  Typo, now fixed.
  
  Revision  ChangesPath
  1.222 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.221
  retrieving revision 1.222
  diff -u -r1.221 -r1.222
  --- http_core.c   1998/08/11 00:09:44 1.221
  +++ http_core.c   1998/08/11 02:50:53 1.222
  @@ -2552,7 +2552,7 @@
   { "ServerTokens", set_serv_tokens, NULL, RSRC_CONF, TAKE1,
 "Determine tokens displayed in the Server: header - Min(imal), OS or Full" 
},
   { "ExtendedStatus", set_extended_status, NULL, RSRC_CONF, TAKE1,
  -  "\On\" to enable extended status information, \"Off\" to disable" },
  +  "\"On\" to enable extended status information, \"Off\" to disable" },
   { "LimitRequestBody", set_limit_req_body,
 (void*)XtOffsetOf(core_dir_config, limit_req_body),
 RSRC_CONF|ACCESS_CONF|OR_ALL, TAKE1,
  
  
  


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

1998-08-31 Thread martin
martin  98/08/31 06:33:52

  Modified:src  CHANGES
   src/main http_core.c
  Log:
  Some time ago I noticed that
  -> TRUE, no matter what 'modname' is.
   -> works as documented
  So, to avoid problems when people add a space by mistake, I
  changed the RAW_ARGS to a TAKE1 because the trailing "modname.c>" or
  "!modname.c>" is always one arg, and we do not intend to allow
  anything after the '>' character anyway.
  
  Reviewed by: Ken Coar, Brian Behlendorf
  
  Revision  ChangesPath
  1.1041+8 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1040
  retrieving revision 1.1041
  diff -u -r1.1040 -r1.1041
  --- CHANGES   1998/08/31 01:18:51 1.1040
  +++ CHANGES   1998/08/31 13:33:50 1.1041
  @@ -1,5 +1,13 @@
   Changes with Apache 1.3.2
   
  +  *) The ", endlimit_section, NULL, OR_ALL, NO_ARGS,
 "Marks end of " },
  -{ "" },
  -{ "" },
  
  
  


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

1998-09-09 Thread coar
coar98/09/09 05:34:37

  Modified:src/main http_core.c
  Log:
Add another case of providing 'why' info through *ERROR_NOTES:
the default handler's 'file not found' report.
  
  Revision  ChangesPath
  1.227 +12 -6 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.226
  retrieving revision 1.227
  diff -u -r1.226 -r1.227
  --- http_core.c   1998/08/31 13:33:51 1.226
  +++ http_core.c   1998/09/09 12:34:36 1.227
  @@ -2726,12 +2726,18 @@
   }
   
   if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) {
  - ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r, 
  -"File does not exist: %s", 
  -  r->path_info 
  -  ? ap_pstrcat(r->pool, r->filename, r->path_info, NULL)
  -  : r->filename);
  - return NOT_FOUND;
  + char *emsg;
  +
  + emsg = "File does not exist: ";
  + if (r->path_info == NULL) {
  + emsg = ap_pstrcat(r->pool, emsg, r->filename, NULL);
  + }
  + else {
  + emsg = ap_pstrcat(r->pool, emsg, r->filename, r->path_info, NULL);
  + }
  + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r, emsg);
  + ap_table_setn(r->notes, "error-notes", emsg);
  + return HTTP_NOT_FOUND;
   }
   if (r->method_number != M_GET) {
   return METHOD_NOT_ALLOWED;
  
  
  


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

1998-09-09 Thread coar
coar98/09/09 15:05:32

  Modified:src  CHANGES
   src/main http_core.c
  Log:
The Include directive added during the 1.3 beta cycle was only
valid in the server config files outside  and
 containers.  Ease that restriction a bit and
allow it inside them (but not in .htaccess files until we
figure out the security ramifications).
  
  PR:   2727
  
  Revision  ChangesPath
  1.1048+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1047
  retrieving revision 1.1048
  diff -u -r1.1047 -r1.1048
  --- CHANGES   1998/09/08 21:15:47 1.1047
  +++ CHANGES   1998/09/09 22:05:23 1.1048
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.2
   
  +  *) Allow "Include" directives anywhere in the server config
  + files (but not .htaccess files).  [Ken Coar] PR#2727
  +
 *) The proxy was refusing to serve CONNECT requests except to
port 443 (https://) and 563 (snews://). The new AllowCONNECT
directive allows the configuration of the ports to which a
  
  
  
  1.228 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.227
  retrieving revision 1.228
  diff -u -r1.227 -r1.228
  --- http_core.c   1998/09/09 12:34:36 1.227
  +++ http_core.c   1998/09/09 22:05:29 1.228
  @@ -2610,7 +2610,7 @@
 "Maximum length of the queue of pending connections, as used by listen(2)" 
},
   { "CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF, TAKE1,
 "The location of the directory Apache changes to before dumping core" },
  -{ "Include", include_config, NULL, RSRC_CONF, TAKE1,
  +{ "Include", include_config, NULL, (RSRC_CONF | ACCESS_CONF), TAKE1,
 "Name of the config file to be included" },
   { "LogLevel", set_loglevel, NULL, RSRC_CONF, TAKE1,
 "Level of verbosity in error logging" },
  
  
  


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

1998-09-10 Thread stoddard
stoddard98/09/10 10:36:16

  Modified:src/main http_core.c
  Log:
  Remove NT 64 thread limit.
  
  Submitted by: Ken Parzygnat, Bill Stoddard
  Reviewed by: Bill Stoddard
  
  Revision  ChangesPath
  1.229 +11 -4 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.228
  retrieving revision 1.229
  diff -u -r1.228 -r1.229
  --- http_core.c   1998/09/09 22:05:29 1.228
  +++ http_core.c   1998/09/10 17:36:15 1.229
  @@ -1991,11 +1991,18 @@
   }
   
   ap_threads_per_child = atoi(arg);
  -#ifdef WIN32
  -if (ap_threads_per_child > 64) {
  - return "Can't have more than 64 threads in Windows (for now)";
  +if (ap_threads_per_child > HARD_SERVER_LIMIT) {
  +fprintf(stderr, "WARNING: ThreadsPerChild of %d exceeds compile time 
limit "
  +"of %d threads,\n", ap_threads_per_child, HARD_SERVER_LIMIT);
  +fprintf(stderr, " lowering ThreadsPerChild to %d.  To increase, 
please "
  +"see the\n", HARD_SERVER_LIMIT);
  +fprintf(stderr, " HARD_SERVER_LIMIT define in 
src/include/httpd.h.\n");
  +ap_threads_per_child = HARD_SERVER_LIMIT;
  +} 
  +else if (ap_threads_per_child < 1) {
  + fprintf(stderr, "WARNING: Require ThreadsPerChild > 0, setting to 1\n");
  + ap_threads_per_child = 1;
   }
  -#endif
   
   return NULL;
   }
  
  
  


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

1998-10-23 Thread coar
coar98/10/23 13:07:40

  Modified:src  CHANGES
   src/main http_core.c
  Log:
Fix problem with config parser not noticing if a container
start line was missing the closing '>'.
  
  PR:   3279
  Submitted by: Ryan Bloom <[EMAIL PROTECTED]>
  Reviewed by:  Ken Coar
  
  Revision  ChangesPath
  1.1123+5 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1122
  retrieving revision 1.1123
  diff -u -r1.1122 -r1.1123
  --- CHANGES   1998/10/23 19:28:51 1.1122
  +++ CHANGES   1998/10/23 20:07:37 1.1123
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.4
   
  +  *) The config parser wasn't correctly noticing a missing '>'
  + on container start lines (e.g., it wouldn't spot
  + "]
  + PR#3279
  +
 *) Add a 'RemoveHandler' directive which will selectively remove
all handler associations for the specified file extensions.
[Ryan Bloom <[EMAIL PROTECTED]>] PR#1799.
  
  
  
  1.237 +35 -12apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.236
  retrieving revision 1.237
  diff -u -r1.236 -r1.237
  --- http_core.c   1998/10/23 19:06:26 1.236
  +++ http_core.c   1998/10/23 20:07:39 1.237
  @@ -1149,6 +1149,15 @@
   return cmd->end_token;
   }
   
  +/*
  + * Report a missing-'>' syntax error.
  + */
  +static char *unclosed_directive(cmd_parms *cmd)
  +{
  +return ap_pstrcat(cmd->pool, cmd->cmd->name,
  +   "> directive missing closing '>'", NULL);
  +}
  +
   static const char *dirsection(cmd_parms *cmd, void *dummy, const char *arg)
   {
   const char *errmsg;
  @@ -1167,10 +1176,12 @@
   return err;
   }
   
  -if (endp) {
  -*endp = '\0';
  +if (endp == NULL) {
  + return unclosed_directive(cmd);
   }
   
  +*endp = '\0';
  +
   cmd->path = ap_getword_conf(cmd->pool, &arg);
   #ifdef OS2
   /* Fix OS/2 HPFS filename case problem. */
  @@ -1238,10 +1249,12 @@
   return err;
   }
   
  -if (endp) {
  -*endp = '\0';
  +if (endp == NULL) {
  + return unclosed_directive(cmd);
   }
   
  +*endp = '\0';
  +
   cmd->path = ap_getword_conf(cmd->pool, &arg);
   cmd->override = OR_ALL|ACCESS_CONF;
   
  @@ -1304,10 +1317,12 @@
   return err;
   }
   
  -if (endp) {
  -*endp = '\0';
  +if (endp == NULL) {
  + return unclosed_directive(cmd);
   }
   
  +*endp = '\0';
  +
   cmd->path = ap_getword_conf(cmd->pool, &arg);
   /* Only if not an .htaccess file */
   if (!old_path) {
  @@ -1376,9 +1391,12 @@
   module *found;
   int nest = 1;
   
  -if (endp) {
  -*endp = '\0';
  +if (endp == NULL) {
  + return unclosed_directive(cmd);
   }
  +
  +*endp = '\0';
  +
   if (not) {
   arg++;
   }
  @@ -1433,9 +1451,12 @@
   int nest = 1;
   
   endp = strrchr(arg, '>');
  -if (endp) {
  - *endp = '\0';
  +if (endp == NULL) {
  + return unclosed_directive(cmd);
   }
  +
  +*endp = '\0';
  +
   if (arg[0] == '!') {
   not = 1;
arg++;
  @@ -1477,9 +1498,11 @@
   return err;
   }
   
  -if (endp) {
  -*endp = '\0';
  +if (endp == NULL) {
  + return unclosed_directive(cmd);
   }
  +
  +*endp = '\0';
   
   /* FIXME: There's another feature waiting to happen here -- since you
can now put multiple addresses/names on a single 
  
  
  


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

1998-10-30 Thread fielding
fielding98/10/29 19:08:56

  Modified:src  CHANGES
   src/include http_log.h
   src/main http_core.c
  Log:
  Eliminate DoS attack when a bad URI path contains what
  looks like a printf format escape.  This was caused by allowing
  tainted data from the network to be placed within the format string
  of a call to ap_log_rerror.
  
  PR: Reported by Remco van de Meent <[EMAIL PROTECTED]>, Studenten Net Twente
  Submitted by: Marc Slemko
  Reviewed by:  Roy Fielding
  
  Revision  ChangesPath
  1.1129+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1128
  retrieving revision 1.1129
  diff -u -r1.1128 -r1.1129
  --- CHANGES   1998/10/28 19:33:52 1.1128
  +++ CHANGES   1998/10/30 03:08:52 1.1129
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.4
   
  +  *) SECURITY: Eliminate DoS attack when a bad URI path contains what
  + looks like a printf format escape.  [Marc Slemko, Studenten Net Twente]
  +
 *) Fix in mod_autoindex: for files where the last modified time stamp was
unavailable, an empty string was printed which was 2 bytes short.
The size and description columns were therefore not aligned correctly.
  
  
  
  1.32  +9 -0  apache-1.3/src/include/http_log.h
  
  Index: http_log.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/http_log.h,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- http_log.h1998/08/06 17:30:24 1.31
  +++ http_log.h1998/10/30 03:08:55 1.32
  @@ -105,6 +105,15 @@
   #define APLOG_MARK   __FILE__,__LINE__
   
   void ap_open_logs (server_rec *, pool *p);
  +
  +/* The two primary logging functions, ap_log_error and ap_log_rerror,
  + * use a printf style format string to build the log message.  It is
  + * VERY IMPORTANT that you not include any raw data from the network,
  + * such as the request-URI or request header fields, within the format
  + * string.  Doing so makes the server vulnerable to a denial-of-service
  + * attack and other messy behavior.  Instead, use a simple format string
  + * like "%s", followed by the string containing the untrusted data.
  + */
   API_EXPORT(void) ap_log_error(const char *file, int line, int level,
 const server_rec *s, const char *fmt, ...)
__attribute__((format(printf,5,6)));
  
  
  
  1.238 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.237
  retrieving revision 1.238
  diff -u -r1.237 -r1.238
  --- http_core.c   1998/10/23 20:07:39 1.237
  +++ http_core.c   1998/10/30 03:08:55 1.238
  @@ -2783,7 +2783,7 @@
else {
emsg = ap_pstrcat(r->pool, emsg, r->filename, r->path_info, NULL);
}
  - ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r, emsg);
  + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r, "%s", emsg);
return HTTP_NOT_FOUND;
   }
   if (r->method_number != M_GET) {
  
  
  


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

1998-11-20 Thread dougm
dougm   98/11/20 13:17:30

  Modified:.STATUS
   src  CHANGES
   src/include ap_mmn.h http_core.h
   src/main http_core.c
  Log:
  ap_exists_config_define() function is now "public"
  Submitted by: Doug MacEachern
  Reviewed by:  Jim, Ben Hyde
  
  Revision  ChangesPath
  1.543 +0 -4  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.542
  retrieving revision 1.543
  diff -u -r1.542 -r1.543
  --- STATUS1998/11/19 17:46:40 1.542
  +++ STATUS1998/11/20 21:17:20 1.543
  @@ -318,10 +318,6 @@
 PR #1120
 Brian: +1
   
  -* un-static-ize ap_exists_config_define() in http_core.c for
  -  everybody to use 
  -  Doug: +1
  - 
   Win32 specific issues:
   
Important
  
  
  
  1.1149+2 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1148
  retrieving revision 1.1149
  diff -u -r1.1148 -r1.1149
  --- CHANGES   1998/11/18 09:15:25 1.1148
  +++ CHANGES   1998/11/20 21:17:21 1.1149
  @@ -1,5 +1,7 @@
   Changes with Apache 1.3.4
   
  +  *) ap_exists_config_define() function is now "public"
  +
 *) Fix documentation of `Action' directive: It can activate a CGI script
when either a handler or a MIME content type is triggered by the 
request.
[Andrew Pimlott <[EMAIL PROTECTED]>] PR#3340
  
  
  
  1.11  +3 -1  apache-1.3/src/include/ap_mmn.h
  
  Index: ap_mmn.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/ap_mmn.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ap_mmn.h  1998/11/08 09:51:09 1.10
  +++ ap_mmn.h  1998/11/20 21:17:25 1.11
  @@ -183,12 +183,14 @@
* 19980917 (1.3.2-dev) - bs2000: changed os_set_authfile() to 
os_set_account()
* 19981108 (1.3.4-dev) - added ap_method_number_of()
*  - changed value of M_INVALID and added WebDAV methods
  + * 19981108.1   - ap_exists_config_define() is now public (minor 
bump)
  + *
*/
   
   #ifndef MODULE_MAGIC_NUMBER_MAJOR
   #define MODULE_MAGIC_NUMBER_MAJOR 19981108
   #endif
  -#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
  +#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR/* backward 
compat */
   
   /* Useful for testing for features. */
  
  
  
  1.51  +1 -0  apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- http_core.h   1998/10/16 07:04:45 1.50
  +++ http_core.h   1998/11/20 21:17:26 1.51
  @@ -133,6 +133,7 @@
   API_EXPORT(unsigned) ap_get_server_port(const request_rec *r);
   API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r);
   API_EXPORT(void) ap_custom_response(request_rec *r, int status, char 
*string);
  +API_EXPORT(int) ap_exists_config_define(char *name);
   
   /* Authentication stuff.  This is one of the places where compatibility
* with the old config files *really* hurts; they don't discriminate at
  
  
  
  1.241 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.240
  retrieving revision 1.241
  diff -u -r1.240 -r1.241
  --- http_core.c   1998/11/14 00:35:54 1.240
  +++ http_core.c   1998/11/20 21:17:28 1.241
  @@ -1421,7 +1421,7 @@
   return NULL;
   }
   
  -static int ap_exists_config_define(char *name)
  +API_EXPORT(int) ap_exists_config_define(char *name)
   {
   char **defines;
   int i;
  
  
  


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

1999-01-07 Thread dgaudet
dgaudet 99/01/07 12:46:59

  Modified:src/main http_core.c
  Log:
  dunno, maybe I'm missing something, but looks like we could save memory here
  
  Revision  ChangesPath
  1.244 +2 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.243
  retrieving revision 1.244
  diff -u -r1.243 -r1.244
  --- http_core.c   1999/01/01 19:04:48 1.243
  +++ http_core.c   1999/01/07 20:46:58 1.244
  @@ -418,6 +418,8 @@
   qsort(sortbin, nelts, sizeof(*sortbin), reorder_sorter);
   
   /* and now build a new array */
  +/* XXX: uh I don't see why we can't reuse the old array, what
  + * was I thinking? -djg */
   sec = ap_make_array(p, nelts, sizeof(void *));
   for (i = 0; i < nelts; ++i) {
*(void **)ap_push_array(sec) = sortbin[i].elt;
  
  
  


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

1999-02-05 Thread rasmus
rasmus  99/02/05 05:17:33

  Modified:src/main http_core.c
  Log:
  This Windows stuff was breaking the Unix compile
  
  Revision  ChangesPath
  1.246 +4 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.245
  retrieving revision 1.246
  diff -u -r1.245 -r1.246
  --- http_core.c   1999/02/05 00:37:49 1.245
  +++ http_core.c   1999/02/05 13:17:33 1.246
  @@ -2629,6 +2629,7 @@
   return NULL;
   }
   
  +#ifdef WIN32
   static const char *set_interpreter_source(cmd_parms *cmd, core_dir_config *d,
   char *arg)
   {
  @@ -2641,6 +2642,7 @@
   }
   return NULL;
   }
  +#endif
   
   /* Note --- ErrorDocument will now work from .htaccess files.  
* The AllowOverride of Fileinfo allows webmasters to turn it off
  @@ -2858,8 +2860,10 @@
 (void*)XtOffsetOf(core_dir_config, limit_req_body),
 OR_ALL, TAKE1,
 "Limit (in bytes) on maximum size of request message body" },
  +#ifdef WIN32
   { "Win32InterpreterSource", set_interpreter_source, NULL, OR_FILEINFO, TAKE1,
 "Where to find interpreter to run Win32 scripts (Registry or script 
shebang line)" },
  +#endif
   { NULL },
   };
   
  
  
  


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

1999-02-05 Thread stoddard
stoddard99/02/05 06:02:20

  Modified:src  CHANGES
   src/main http_core.c
  Log:
  Update CHANGES file. Change Win32InterpreterSource argument from "shebang"
  to "script".
  
  Revision  ChangesPath
  1.1231+4 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1230
  retrieving revision 1.1231
  diff -u -r1.1230 -r1.1231
  --- CHANGES   1999/02/05 09:26:07 1.1230
  +++ CHANGES   1999/02/05 14:02:17 1.1231
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.5
   
  +  *) Win32: Add new config directive, Win32InterpreterSource, to enable
  + searching the Win32 registry for script interpreters.
  + [Bill Stoddard]
  +
 *) Win32: The compiled-in default filename for the error log is now
error.log, which matches the default in the distributed httpd.conf.
[Paul Sutton]
  
  
  
  1.247 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.246
  retrieving revision 1.247
  diff -u -r1.246 -r1.247
  --- http_core.c   1999/02/05 13:17:33 1.246
  +++ http_core.c   1999/02/05 14:02:19 1.247
  @@ -2635,7 +2635,7 @@
   {
   if (!strcasecmp(arg, "registry")) {
   d->script_interpreter_source = INTERPRETER_SOURCE_REGISTRY;
  -} else if (!strcasecmp(arg, "shebang")) {
  +} else if (!strcasecmp(arg, "script")) {
   d->script_interpreter_source = INTERPRETER_SOURCE_SHEBANG;
   } else {
   d->script_interpreter_source = INTERPRETER_SOURCE_SHEBANG;
  
  
  


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

1999-02-06 Thread stoddard
stoddard99/02/05 19:02:12

  Modified:src/main http_core.c
  Log:
  Change "Win32InterpreterSource" to "ScriptInterpreterSource"
  
  Revision  ChangesPath
  1.248 +2 -2  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.247
  retrieving revision 1.248
  diff -u -r1.247 -r1.248
  --- http_core.c   1999/02/05 14:02:19 1.247
  +++ http_core.c   1999/02/06 03:02:11 1.248
  @@ -850,7 +850,7 @@
   return FileTypeSCRIPT;
   else {
   ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r->server,
  - "Win32InterpreterSource config directive set to 
\"registry\".\n\t"
  + "ScriptInterpreterSource config directive set to 
\"registry\".\n\t"
"Registry was searched but interpreter not found. Trying the 
shebang line.");
   }
   }
  @@ -2861,7 +2861,7 @@
 OR_ALL, TAKE1,
 "Limit (in bytes) on maximum size of request message body" },
   #ifdef WIN32
  -{ "Win32InterpreterSource", set_interpreter_source, NULL, OR_FILEINFO, TAKE1,
  +{ "ScriptInterpreterSource", set_interpreter_source, NULL, OR_FILEINFO, 
TAKE1,
 "Where to find interpreter to run Win32 scripts (Registry or script 
shebang line)" },
   #endif
   { NULL },
  
  
  


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

1999-02-09 Thread fielding
fielding99/02/09 12:20:27

  Modified:.STATUS
   htdocs/manual/mod core.html directives.html
   src  CHANGES
   src/main http_core.c
  Log:
  Added a  sectioning directive that allows
  the user to assign authentication control to any HTTP method that
  is *not* given in the argument list; i.e., the logical negation
  of the  directive.  This is particularly useful for controlling
  access on methods unknown to the Apache core, but perhaps known by
  some module or CGI script.
  
  Submitted by:  Roy Fielding and Tony Finch <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.617 +1 -13 apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.616
  retrieving revision 1.617
  diff -u -r1.616 -r1.617
  --- STATUS1999/02/09 18:00:18 1.616
  +++ STATUS1999/02/09 20:20:22 1.617
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 1999/02/09 18:00:18 $]
  +  Last modified at [$Date: 1999/02/09 20:20:22 $]
   
   Release:
   
  @@ -60,18 +60,6 @@
   * John Bley's [PATCH] malloc checks
   MID: <[EMAIL PROTECTED]>
   Status: Jim -0 (maybe the messages could be more detailed?)
  -
  -* Tony Finch's [PATCH] 
  -Message-ID: <[EMAIL PROTECTED]>
  -Status: Roy [looks good, but we might be able to do better by using
  - the same function as Limit and just checking cmd]
  -
  -* Dean's [PATCH] etag continued (take 2)
  -  Adds strong comparison functions to other checks.
  -MID: <[EMAIL PROTECTED]>
  -Status: Roy needs to fix ap_find_opaque_token() because it doesn't
  -do the right HTTP parsing anyway, so this will probably be
  -folded in at the same time.
   
   * Cliff's [PATCH] 500 errors not giving error-notes (related to PR #3455)
   Message-ID: <[EMAIL PROTECTED]>
  
  
  
  1.145 +32 -1 apache-1.3/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /home/cvs/apache-1.3/htdocs/manual/mod/core.html,v
  retrieving revision 1.144
  retrieving revision 1.145
  diff -u -r1.144 -r1.145
  --- core.html 1999/02/06 11:00:57 1.144
  +++ core.html 1999/02/09 20:20:23 1.145
  @@ -49,6 +49,7 @@
   KeepAlive
   KeepAliveTimeout
   
  +
   LimitRequestBody
   LimitRequestFields
   LimitRequestFieldsize
  @@ -659,7 +660,8 @@
   
   The directory sections typically occur in the access.conf file, but they
   may appear in any configuration file.  directives cannot
  -nest, and cannot appear in a  section.
  +nest, and cannot appear in a  or
  + section.
   
   
   See also: How Directory,
  @@ -1337,6 +1339,35 @@
   If GET is used it will also restrict HEAD requests.
   If you wish to limit all methods, do not include any
    directive at all.
  +
  +
  +
  + directive
  +
  +Syntax:
  +  ... 
  +Context: any
  +Status: core
  +Compatibility: Available in Apache 1.3.5 and later
  +
  + and  are used to enclose a group of
  +access control directives which will then apply to any HTTP access method
  +not listed in the arguments; i.e., it is the opposite of a
  + section and can be used to control both
  +standard and nonstandard/unrecognized methods. See the documentation for 
  + for more details.
   
   
   
  
  
  
  1.55  +1 -0  apache-1.3/htdocs/manual/mod/directives.html
  
  Index: directives.html
  ===
  RCS file: /home/cvs/apache-1.3/htdocs/manual/mod/directives.html,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- directives.html   1999/02/06 11:00:57 1.54
  +++ directives.html   1999/02/09 20:20:23 1.55
  @@ -123,6 +123,7 @@
   KeepAliveTimeout
   LanguagePriority
   
  +
   LimitRequestBody
   LimitRequestFields
   LimitRequestFieldsize
  
  
  
  1.1245+7 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1244
  retrieving revision 1.1245
  diff -u -r1.1244 -r1.1245
  --- CHANGES   1999/02/09 18:00:22 1.1244
  +++ CHANGES   1999/02/09 20:20:25 1.1245
  @@ -1,5 +1,12 @@
   Changes with Apache 1.3.5
   
  +  *) Added a  sectioning directive that allows
  + the user to assign authentication control to any HTTP method that
  + is *not* given in the argument list; i.e., the logical negation
  + of the  directive.  This is particularly useful for controlling
  + access on methods unknown to the Apache core, but perhaps known by
  + 

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

1999-02-24 Thread dgaudet
dgaudet 99/02/24 01:33:38

  Modified:src/main http_core.c
  Log:
  did I really remove this NULL?  what was I thinking?
  
  Revision  ChangesPath
  1.251 +2 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.250
  retrieving revision 1.251
  diff -u -r1.250 -r1.251
  --- http_core.c   1999/02/22 17:07:39 1.250
  +++ http_core.c   1999/02/24 09:33:37 1.251
  @@ -2874,7 +2874,8 @@
   { "LimitRequestBody", set_limit_req_body,
 (void*)XtOffsetOf(core_dir_config, limit_req_body),
 OR_ALL, TAKE1,
  -  "Limit (in bytes) on maximum size of request message body" }
  +  "Limit (in bytes) on maximum size of request message body" },
  +{ NULL }
   };
   
   /*
  
  
  


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

1999-03-07 Thread fielding
fielding99/03/07 07:35:18

  Modified:src  CHANGES
   src/main http_core.c
  Log:
  Added informative error messages for failed munmap() and fseek() calls
  in http_core.c.
  
  Submitted by: John Bley <[EMAIL PROTECTED]>, Roy Fielding
  
  Revision  ChangesPath
  1.1263+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1262
  retrieving revision 1.1263
  diff -u -r1.1262 -r1.1263
  --- CHANGES   1999/03/07 15:05:33 1.1262
  +++ CHANGES   1999/03/07 15:35:14 1.1263
  @@ -18,6 +18,9 @@
   
 *) Fixed a few compiler nits.  [John Bley <[EMAIL PROTECTED]>]
   
  +  *) Added informative error messages for failed munmap() and fseek() calls
  + in http_core.c. [John Bley, Roy Fielding]
  +
 *) Added some informative error messages for some failed malloc()
calls. [John Bley <[EMAIL PROTECTED]>, Jim Jagielski]
   
  
  
  
  1.253 +14 -4 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.252
  retrieving revision 1.253
  diff -u -r1.252 -r1.253
  --- http_core.c   1999/03/07 13:13:52 1.252
  +++ http_core.c   1999/03/07 15:35:17 1.253
  @@ -1070,7 +1070,7 @@
   
   if (error_number == 401 &&
line[0] != '/' && line[0] != '"') { /* Ignore it... */
  - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, NULL,
  + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, cmd->server,
 "cannot use a full URL in a 401 ErrorDocument "
 "directive --- ignoring!");
   }
  @@ -2937,7 +2937,11 @@
   {
   struct mmap *mmd = mmv;
   
  -munmap(mmd->mm, mmd->length);
  +if (munmap(mmd->mm, mmd->length) == -1) {
  +ap_log_error(APLOG_MARK, APLOG_ERR, NULL,
  + "Failed to munmap memory of length %ld at 0x%lx",
  + (long) mmd->length, (long) mmd->mm);
  +}
   }
   #endif
   
  @@ -3066,8 +3070,14 @@
else {
long offset, length;
while (ap_each_byterange(r, &offset, &length)) {
  - fseek(f, offset, SEEK_SET);
  - ap_send_fd_length(f, r, length);
  + if (fseek(f, offset, SEEK_SET) == -1) {
  + ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
  +   "Failed to fseek for byterange (%ld, %ld)",
  +   offset, length);
  + }
  + else {
  + ap_send_fd_length(f, r, length);
  + }
}
}
}
  
  
  


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

1999-03-07 Thread jim
jim 99/03/07 07:41:57

  Modified:src/main http_core.c
  Log:
  Older OSs simply return non-0 on fseek errors
  
  Revision  ChangesPath
  1.254 +5 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.253
  retrieving revision 1.254
  diff -u -r1.253 -r1.254
  --- http_core.c   1999/03/07 15:35:17 1.253
  +++ http_core.c   1999/03/07 15:41:56 1.254
  @@ -3070,7 +3070,11 @@
else {
long offset, length;
while (ap_each_byterange(r, &offset, &length)) {
  - if (fseek(f, offset, SEEK_SET) == -1) {
  + /*
  +  * Non zero returns are more portable than checking
  +  * for a return of -1.
  +  */
  + if (fseek(f, offset, SEEK_SET)) {
ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
  "Failed to fseek for byterange (%ld, %ld)",
  offset, length);
  
  
  


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

1999-03-19 Thread stoddard
stoddard99/03/19 15:18:02

  Modified:src/main http_core.c
  Log:
  Fix Win32 CGI buffer overflow
  
  Revision  ChangesPath
  1.255 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.254
  retrieving revision 1.255
  diff -u -r1.254 -r1.255
  --- http_core.c   1999/03/07 15:41:56 1.254
  +++ http_core.c   1999/03/19 23:18:01 1.255
  @@ -865,7 +865,7 @@
   return FileTypeUNKNOWN;
   }
   
  -bResult = ReadFile(hFile, (void*) &buffer, sizeof(buffer), 
  +bResult = ReadFile(hFile, (void*) &buffer, sizeof(buffer) - 1, 
  &nBytesRead, NULL);
   if (!bResult || (nBytesRead == 0)) {
   ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
  
  
  


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

1999-03-19 Thread stoddard
stoddard99/03/19 15:54:10

  Modified:src/main http_core.c
  Log:
  Fix another Win32 CGI bug...
  
  Revision  ChangesPath
  1.256 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.255
  retrieving revision 1.256
  diff -u -r1.255 -r1.256
  --- http_core.c   1999/03/19 23:18:01 1.255
  +++ http_core.c   1999/03/19 23:54:08 1.256
  @@ -892,7 +892,7 @@
   }
   else {
   /* Check to see if it's a executable */
  -IMAGE_DOS_HEADER *hdr = (IMAGE_DOS_HEADER*)interpreter;
  +IMAGE_DOS_HEADER *hdr = (IMAGE_DOS_HEADER*)buffer;
   if (hdr->e_magic == IMAGE_DOS_SIGNATURE && hdr->e_cblp < 512) {
   fileType = FileTypeEXE;
   }
  
  
  


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

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

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


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

1999-04-28 Thread martin
martin  99/04/28 01:35:32

  Modified:src/include http_core.h
   src/main http_core.c
  Log:
  Fixed the ServerSignature directive to work as documented.
  
  PR: 4248
  Submitted by: Raymond S Brand <[EMAIL PROTECTED]>
  Reviewed by:  Martin Kraemer
  
  Revision  ChangesPath
  1.56  +2 -1  apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- http_core.h   1999/03/10 20:18:55 1.55
  +++ http_core.h   1999/04/28 08:35:08 1.56
  @@ -251,7 +251,8 @@
   unsigned long limit_req_body;  /* limit on bytes in request msg body */
   
   /* logging options */
  -enum { srv_sig_off, srv_sig_on, srv_sig_withmail } server_signature;
  +enum { srv_sig_unset, srv_sig_off, srv_sig_on,
  + srv_sig_withmail } server_signature;
   int loglevel;
   
   /* Access control */
  
  
  
  1.260 +10 -2 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.259
  retrieving revision 1.260
  diff -u -r1.259 -r1.260
  --- http_core.c   1999/04/20 17:03:27 1.259
  +++ http_core.c   1999/04/28 08:35:31 1.260
  @@ -148,6 +148,9 @@
   #ifdef WIN32
   conf->script_interpreter_source = INTERPRETER_SOURCE_UNSET;
   #endif
  +
  +conf->server_signature = srv_sig_unset;
  +
   return (void *)conf;
   }
   
  @@ -271,6 +274,10 @@
   }
   #endif
   
  +if (new->server_signature != srv_sig_unset) {
  + conf->server_signature = new->server_signature;
  +}
  +
   return (void*)conf;
   }
   
  @@ -2478,7 +2485,8 @@
   
   conf = (core_dir_config *)ap_get_module_config(r->per_dir_config,
   &core_module);
  -if (conf->server_signature == srv_sig_off) {
  +if ((conf->server_signature == srv_sig_off)
  + || (conf->server_signature == srv_sig_unset)) {
return "";
   }
   
  @@ -2752,7 +2760,7 @@
   { "ServerName", set_server_string_slot,
 (void *)XtOffsetOf (server_rec, server_hostname), RSRC_CONF, TAKE1,
 "The hostname of the server" },
  -{ "ServerSignature", set_signature_flag, NULL, ACCESS_CONF|RSRC_CONF, TAKE1,
  +{ "ServerSignature", set_signature_flag, NULL, OR_ALL, TAKE1,
 "En-/disable server signature (on|off|email)" },
   { "ServerRoot", set_server_root, NULL, RSRC_CONF, TAKE1,
 "Common directory of server-related files (logs, confs, etc.)" },
  
  
  


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

1998-01-30 Thread marc
marc98/01/29 19:36:59

  Modified:src/main http_core.c httpd.h
  Log:
  Make WIN32 compile after incomplete psignature addition.
  
  Revision  ChangesPath
  1.152 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.151
  retrieving revision 1.152
  diff -u -r1.151 -r1.152
  --- http_core.c   1998/01/29 20:36:08 1.151
  +++ http_core.c   1998/01/30 03:36:56 1.152
  @@ -1631,7 +1631,7 @@
  return NULL;
   }
   
  -const char *psignature(const char *prefix, request_rec *r)
  +API_EXPORT(const char *) psignature(const char *prefix, request_rec *r)
   {
   char sport[20];
   core_dir_config *conf =
  
  
  
  1.178 +1 -1  apache-1.3/src/main/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/httpd.h,v
  retrieving revision 1.177
  retrieving revision 1.178
  diff -u -r1.177 -r1.178
  --- httpd.h   1998/01/26 18:24:34 1.177
  +++ httpd.h   1998/01/30 03:36:57 1.178
  @@ -947,6 +947,6 @@
   #define RAISE_SIGSTOP(x)
   #endif
   
  -extern const char *psignature(const char *prefix, request_rec *r);
  +API_EXPORT(extern const char *) psignature(const char *prefix, request_rec 
*r);
   
   #endif   /* !APACHE_HTTPD_H */
  
  
  


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

1998-02-18 Thread dgaudet
dgaudet 98/02/18 02:01:18

  Modified:htdocs/manual upgrading_to_1_3.html
   htdocs/manual/mod core.html
   src  CHANGES
   src/include http_config.h
   src/main http_core.c http_request.c
  Log:
  Fix various parsing bugs with  sections.  Improve the
  error messages generated.  Introduced cmd->end_token to make it easier
  to do nested sections with proper error reporting.  (Note that it can't
  be used for  or  unfortunately.)
  
  PR#379:  is not allowed within  because it has no effect.
  
  PR#1817: Change  to work with basenames only.  This fixes both
  the bug introduced by the wildcarding change (* doesn't match /) and
  bugs such as  not working.
  
  PR: 379, 1817
  
  Revision  ChangesPath
  1.13  +6 -0  apache-1.3/htdocs/manual/upgrading_to_1_3.html
  
  Index: upgrading_to_1_3.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/upgrading_to_1_3.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- upgrading_to_1_3.html 1998/02/05 20:04:16 1.12
  +++ upgrading_to_1_3.html 1998/02/18 10:00:57 1.13
  @@ -125,6 +125,12 @@
messages.  After that all errors are logged in the error_log.
This makes it more convenient to start Apache via rsh, ssh,
or crontabs.
  +   
  +   sections previously could take a full pathname, and
  + were matched against the full pathnames.  This had some
  + inconsistancies, and was removed.  To emulate this older behaviour
  + use a  section nested inside a 
  + section.
   
   
   
  
  
  
  1.101 +10 -7 apache-1.3/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/core.html,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- core.html 1998/02/15 00:18:14 1.100
  +++ core.html 1998/02/18 10:01:01 1.101
  @@ -811,12 +811,17 @@
   filename. It is comparable to the  directive and
    directives. It
  -should be matched with a  directive. Directives that
  -apply to the filename given should be listed
  -within.  sections are processed in the
  +should be matched with a  directive.  The
  +directives given within this section will be applied to any
  +object with a basename (last component of filename) matching
  +the specified filename.
  + sections are processed in the
   order they appear in the configuration file, after the
    sections and .htaccess files are
  -read, but before  sections.
  +read, but before  sections.  Note that
  + can be nested inside 
  +sections to restrict the portion of the filesystem they
  +apply to.
   
   The filename argument should include a filename, or a
   wild-card string, where `?' matches any single character, and `*' matches any
  @@ -837,9 +842,7 @@
   HREF="#location"> sections,
    sections can be used inside .htaccess
   files. This allows users to control access to their own files, at a
  -file-by-file level. When used in an .htaccess file, if the
  -filename does not begin with a / character,
  -the directory being applied will be prefixed automatically.
  +file-by-file level.
   
   
   
  
  
  
  1.636 +14 -0 apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.635
  retrieving revision 1.636
  diff -u -r1.635 -r1.636
  --- CHANGES   1998/02/18 08:55:30 1.635
  +++ CHANGES   1998/02/18 10:01:05 1.636
  @@ -1,5 +1,19 @@
   Changes with Apache 1.3b6
   
  +  *) Previously Apache would permit  to end  (and
  + similary for Location and Directory), now this is diagnosed as an
  + error.  Improve error messages for mismatched sections (,
  + , , , ...).  [Dean Gaudet]
  +
  +  *)  is not permitted within  (because of the
  + semantic ordering).  [Dean Gaudet] PR#379
  +
  +  *)  with wildcards was broken by the change in wildcard
  + semantics (* does not match /).  To fix this,  now
  + apply only to the basename of the request filename.  This
  + fixes some other inconsistencies in  semantics
  + (such as  not working).  [Dean Gaudet] PR#1817
  +
 *) Removed bogus "dist.tar" target from Makefile.tmpl and make sure
backup files are removed on "clean" target [Ralf S. Engelschall]

  
  
  
  1.67  +3 -2  apache-1.3/src/include/http_config.h
  
  Index: http_config.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/http_config.h,v
  retrieving revision 1.66
  retrieving revision 1.6

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

1998-02-21 Thread dgaudet
dgaudet 98/02/20 17:42:41

  Modified:src/include conf.h http_core.h
   src/main http_core.c util_script.c
  Log:
  RLIMIT_AS is part of Single Unix... and presumably posix as well.  So it
  makes sense to support it everywhere rather than just on Linux.  So treat
  it like RLIMIT_VMEM and RLIMIT_DATA.
  
  Revision  ChangesPath
  1.182 +0 -7  apache-1.3/src/include/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/conf.h,v
  retrieving revision 1.181
  retrieving revision 1.182
  diff -u -r1.181 -r1.182
  --- conf.h1998/02/18 20:52:55 1.181
  +++ conf.h1998/02/21 01:42:36 1.182
  @@ -372,13 +372,6 @@
   typedef int rlim_t;
   #endif
   
  -/* Linux 2.0 and above implement the new posix RLIMIT_AS rather than the
  - * older BSD semantics (some would actually call this a bug, like me -djg).
  - */
  -#ifndef RLIMIT_VMEM
  -#define RLIMIT_VMEM RLIMIT_AS
  -#endif
  -
   /* flock is faster ... but hasn't been tested on 1.x systems */
   #define USE_FLOCK_SERIALIZED_ACCEPT
   
  
  
  
  1.36  +1 -1  apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- http_core.h   1998/02/02 19:46:55 1.35
  +++ http_core.h   1998/02/21 01:42:36 1.36
  @@ -202,7 +202,7 @@
   #ifdef RLIMIT_CPU
   struct rlimit *limit_cpu;
   #endif
  -#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM)
  +#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
   struct rlimit *limit_mem;
   #endif
   #ifdef RLIMIT_NPROC
  
  
  
  1.162 +10 -8 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.161
  retrieving revision 1.162
  diff -u -r1.161 -r1.162
  --- http_core.c   1998/02/20 10:51:34 1.161
  +++ http_core.c   1998/02/21 01:42:39 1.162
  @@ -127,7 +127,7 @@
   #ifdef RLIMIT_CPU
   conf->limit_cpu = NULL;
   #endif
  -#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM)
  +#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
   conf->limit_mem = NULL;
   #endif
   #ifdef RLIMIT_NPROC
  @@ -207,7 +207,7 @@
   #ifdef RLIMIT_CPU
   if (new->limit_cpu) conf->limit_cpu = new->limit_cpu;
   #endif
  -#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM)
  +#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
   if (new->limit_mem) conf->limit_mem = new->limit_mem;
   #endif
   #ifdef RLIMIT_NPROC
  @@ -1560,7 +1560,7 @@
   }
   
   
  -#if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || 
defined(RLIMIT_NPROC)
  +#if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || 
defined(RLIMIT_NPROC) || defined(RLIMIT_AS)
   static void set_rlimit(cmd_parms *cmd, struct rlimit **plimit, const char 
*arg,
  const char * arg2, int type)
   {
  @@ -1612,7 +1612,7 @@
   }
   #endif
   
  -#if !defined (RLIMIT_CPU) || !(defined (RLIMIT_DATA) || defined 
(RLIMIT_VMEM)) || !defined (RLIMIT_NPROC)
  +#if !defined (RLIMIT_CPU) || !(defined (RLIMIT_DATA) || defined 
(RLIMIT_VMEM) || defined(RLIMIT_AS)) || !defined (RLIMIT_NPROC)
   static const char *no_set_limit (cmd_parms *cmd, core_dir_config *conf,
 char *arg, char *arg2)
   {
  @@ -1630,12 +1630,14 @@
   }
   #endif
   
  -#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM)
  +#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
   const char *set_limit_mem (cmd_parms *cmd, core_dir_config *conf, char *arg, 
char * arg2)
   {
  -#ifdef RLIMIT_DATA
  +#if defined(RLIMIT_AS)
  +set_rlimit(cmd,&conf->limit_mem,arg,arg2,RLIMIT_AS);
  +#elif defined(RLIMIT_DATA)
   set_rlimit(cmd,&conf->limit_mem,arg,arg2,RLIMIT_DATA);
  -#else
  +#else defined(RLIMIT_VMEM)
   set_rlimit(cmd,&conf->limit_mem,arg,arg2,RLIMIT_VMEM);
   #endif
   return NULL;
  @@ -1898,7 +1900,7 @@
   #endif
 OR_ALL, TAKE12, "soft/hard limits for max CPU usage in seconds" },
   { "RLimitMEM",
  -#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM)
  +#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined (RLIMIT_AS)
set_limit_mem, (void*)XtOffsetOf(core_dir_config, limit_mem),
   #else
no_set_limit, NULL,
  
  
  
  1.95  +10 -6 apache-1.3/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/util_script.c,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- util_script.c 1998/02/01 22:05:38 1.94
  

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

1998-05-09 Thread coar
coar98/05/08 21:42:30

  Modified:htdocs/manual new_features_1_3.html upgrading_to_1_3.html
   htdocs/manual/mod core.html
   src/main http_core.c http_main.c
  Log:
Final touches on removing the AddVersionComponent directive and
correcting my BD references to something called "Server-Version."
D'oh!
  
  Revision  ChangesPath
  1.57  +8 -10 apache-1.3/htdocs/manual/new_features_1_3.html
  
  Index: new_features_1_3.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/new_features_1_3.html,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- new_features_1_3.html 1998/05/08 12:09:45 1.56
  +++ new_features_1_3.html 1998/05/09 04:42:25 1.57
  @@ -639,17 +639,15 @@
 configuration.

New ways to customise the server identity
  +  HREF="mod/core.html#addversionplatform"
  + >Including the operating system in the server
  +  identity
 
  -  Two new directives, AddVersionComponent and
  -  AddVersionPlatform, allow the Webmaster to change the value of
  -  the Server-Version response header field which is sent back
  -  to clients.  AddVersionComponent replaces the
  -  -DSERVER_SUBVERSION=\"string\" CCFLAGS mechanism
  -  used in earlier versions of the Apache Web server, allowing the string to
  -  be modified without having to recompile the server.  And the
  -  AddVersionPlatform directive controls whether the server will
  +  A new directive, AddVersionPlatform, allows the Webmaster
  +  to change the value of
  +  the Server response header field which is sent back
  +  to clients.  The AddVersionPlatform directive controls
  +  whether the server will
 include a non-specific note in the server identity about the type of
 operating system on which the server is running.  As of Apache 1.3, this
 additional information is included by default.
  
  
  
  1.22  +0 -1  apache-1.3/htdocs/manual/upgrading_to_1_3.html
  
  Index: upgrading_to_1_3.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/upgrading_to_1_3.html,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- upgrading_to_1_3.html 1998/05/07 14:28:42 1.21
  +++ upgrading_to_1_3.html 1998/05/09 04:42:25 1.22
  @@ -243,4 +243,3 @@
   
   
   
  -
  
  
  
  1.115 +3 -53 apache-1.3/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/core.html,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- core.html 1998/05/08 12:09:46 1.114
  +++ core.html 1998/05/09 04:42:27 1.115
  @@ -24,7 +24,6 @@
   AccessConfig
   AccessFileName
   AddModule
  -AddVersionComponent
   AddVersionPlatform
   AllowOverride
   AuthName
  @@ -180,55 +179,6 @@
   be cleared with the ClearModuleList
   directive.
   
  -AddVersionComponent directive
  -
  -Syntax: AddVersionComponent string
  -Context: server config 
  -Status: core
  -Compatibility: AddVersionComponent is only available
  - in Apache 1.3 and later
  -
  -
  -Use this directive to add a string to the Server-Version
  -response header field which is sent back to clients.  This field identifies
  -the server software as the Apache Web server, and can also list additional
  -information.  This directive may occur multiple times, and the results are
  -cumulative.  In each case the string should take one of the following forms:
  -
  -
  - AddVersionComponent "(some comment within parentheses)"
  -  
  -   or
  -   
  -  
  -  AddVersionComponent "component-name/major.minor"
  - 
  -
  -
  -that is, the string should either be arbitrary text enclosed in parentheses,
  -or else a specific component token and version number (such as "mymod/1.0").
  -
  -
  -This setting applies to the entire server, and cannot be enabled or
  -disabled on a virtualhost-by-virtualhost basis.
  -
  -
  -This directive replaces the SERVER_SUBVERSION setting
  -that was available in earlier versions of the Apache Web server.
  -
  -
   AddVersionPlatform directive
   
   
   This directive controls whether the server's operating system platform
  -will be identified in the Server-Version response header
  +will be identified in the Server response header
   field which is sent back to clients.  If enabled, a non-specific platform
   designation will be added to the identity string, as shown below:
   
   
AddVersionPlatform Off

  - Server sends: Server-Version: Apache/1.3.0
  + Server sends: Server: Apache/1.3.0

AddVersionPlatform On (or not specified)

  - Server sends: Server-Version: Apache/1.3.0 (UNIX)
  + Server sends: Server: Apache/1.3.0 (UNIX)

   
   
  
  
  
  1.198

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

1998-05-09 Thread ben
ben 98/05/09 08:49:36

  Modified:src  CHANGES
   src/main http_core.c http_main.c
  Log:
  Make Win32 work again after DoS changes.
  
  Revision  ChangesPath
  1.840 +3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.839
  retrieving revision 1.840
  diff -u -r1.839 -r1.840
  --- CHANGES   1998/05/09 15:09:29 1.839
  +++ CHANGES   1998/05/09 15:49:32 1.840
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b7
   
  +  *) WIN32: Make Win32 work again after the /dev/null DoS fix.
  + [Ben Laurie]
  +
 *) WIN32: Check for buffer overflows in ap_os_canonical_filename.
[Ben Laurie]
   
  
  
  
  1.199 +1 -1  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.198
  retrieving revision 1.199
  diff -u -r1.198 -r1.199
  --- http_core.c   1998/05/09 04:42:28 1.198
  +++ http_core.c   1998/05/09 15:49:33 1.199
  @@ -1398,7 +1398,7 @@
   if (err != NULL) return err;
   
   if (!ap_is_directory (arg)) return "ServerRoot must be a valid 
directory";
  -ap_cpystrn (ap_server_root, arg, sizeof(ap_server_root));
  +ap_cpystrn (ap_server_root, ap_os_canonical_filename(cmd->pool, arg), 
sizeof(ap_server_root));
   return NULL;
   }
   
  
  
  
  1.346 +2 -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.345
  retrieving revision 1.346
  diff -u -r1.345 -r1.346
  --- http_main.c   1998/05/09 15:26:29 1.345
  +++ http_main.c   1998/05/09 15:49:34 1.346
  @@ -5253,10 +5253,10 @@
break;
   #endif /* WIN32 */
case 'd':
  - ap_cpystrn(ap_server_root, optarg, sizeof(ap_server_root));
  + ap_cpystrn(ap_server_root, ap_os_canonical_filename(pconf, optarg), 
sizeof(ap_server_root));
break;
case 'f':
  - ap_cpystrn(ap_server_confname, optarg, sizeof(ap_server_confname));
  + ap_cpystrn(ap_server_confname, ap_os_canonical_filename(pconf, 
optarg), sizeof(ap_server_confname));
break;
case 'v':
printf("Server version: %s\n", ap_get_server_version());
  
  
  


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

1998-05-11 Thread jim
jim 98/05/11 13:08:10

  Modified:.STATUS
   htdocs/manual new_features_1_3.html
   htdocs/manual/mod core.html
   src  CHANGES
   src/include http_conf_globals.h httpd.h
   src/main http_core.c http_main.c
  Log:
  Submitted by: Jim Jagielski
  Replace the AddVersionPlatform directive with ServerTokens directive
  which allow for either Minimal ("Apache/1.3.0"), OS ("Apache/1.3.0 (UNIX)")
  or Full ("Apache/1.3.0 (UNIX) PHP/3.0") type Server headers.
  SERVER_SUBVERSION is no longer supported.
  
  Revision  ChangesPath
  1.395 +0 -10 apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.394
  retrieving revision 1.395
  diff -u -r1.394 -r1.395
  --- STATUS1998/05/10 17:19:01 1.394
  +++ STATUS1998/05/11 20:08:02 1.395
  @@ -18,16 +18,6 @@
  o Jim's looked over the ap_snprintf() stuff (the changes that Dean
did to make thread-safe) and they look fine.
   
  -* The whole SERVER_SUBVERSION, Server: token debate.
  -  Problem: currently the additional tokens show up in the
  -   reverse order that they were added. Also, no real control
  -   over whether to display them or not. Keeping SERVER_SUBVERSION
  -   available "conflicts" with the new ap_add_version_component()
  -   function.
  - Available patch:
  - <[EMAIL PROTECTED]>
  - Status:
  -
   WIN32 1.3 FINAL RELEASE SHOWSTOPPERS:
   
   * SECURITY: check if the magic con/aux/nul/etc names do anything
  
  
  
  1.58  +8 -9  apache-1.3/htdocs/manual/new_features_1_3.html
  
  Index: new_features_1_3.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/new_features_1_3.html,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- new_features_1_3.html 1998/05/09 04:42:25 1.57
  +++ new_features_1_3.html 1998/05/11 20:08:03 1.58
  @@ -639,18 +639,17 @@
 configuration.

Including the operating system in the server
 identity
 
  -  A new directive, AddVersionPlatform, allows the Webmaster
  -  to change the value of
  -  the Server response header field which is sent back
  -  to clients.  The AddVersionPlatform directive controls
  -  whether the server will
  -  include a non-specific note in the server identity about the type of
  -  operating system on which the server is running.  As of Apache 1.3, this
  -  additional information is included by default.
  +  A new directive, ServerTokens, allows the Webmaster
  +  to change the value of the Server response header
  +  field which is sent back to clients.  The ServerTokens
  +  directive controls whether the server will include a non-specific
  +  note in the server identity about the type of operating system on
  +  which the server is running as well as included module information.
  +  As of Apache 1.3, this additional information is included by default.

   
   
  
  
  
  1.116 +51 -47apache-1.3/htdocs/manual/mod/core.html
  
  Index: core.html
  ===
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/core.html,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- core.html 1998/05/09 04:42:27 1.115
  +++ core.html 1998/05/11 20:08:04 1.116
  @@ -24,7 +24,6 @@
   AccessConfig
   AccessFileName
   AddModule
  -AddVersionPlatform
   AllowOverride
   AuthName
   AuthType
  @@ -78,6 +77,7 @@
   ServerPath
   ServerRoot
   ServerSignature
  +ServerTokens
   ServerType
   StartServers
   ThreadsPerChild
  @@ -179,52 +179,6 @@
   be cleared with the ClearModuleList
   directive.
   
  -AddVersionPlatform directive
  -
  -Syntax: AddVersionPlatform On|Off
  -Context: server config 
  -Status: core
  -Compatibility: AddVersionPlatform is only available
  - in Apache 1.3 and later
  -
  -
  -This directive controls whether the server's operating system platform
  -will be identified in the Server response header
  -field which is sent back to clients.  If enabled, a non-specific platform
  -designation will be added to the identity string, as shown below:
  -
  -
  - AddVersionPlatform Off
  - 
  - Server sends: Server: Apache/1.3.0
  - 
  - AddVersionPlatform On (or not specified)
  - 
  - Server sends: Server: Apache/1.3.0 (UNIX)
  - 
  -
  -
  -This setting applies to the entire server, and cannot be enabled or
  -disabled on a virtualhost-by-virtualhost basis.
  -
  -
  -By default, this information is included in the server
  -identity string.
  -
  -
  -
   AllowOverride directive
   
   EMail setting additionally creates a "mailto:";
   reference to the ServerAdmin of the
   referenced document.
  +
  +
  +
  +ServerTokens directive
 

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

1998-07-03 Thread Marc Slemko
On 3 Jul 1998 [EMAIL PROTECTED] wrote:

> coar98/07/03 13:06:02
> 
>   Modified:src  CHANGES
>src/main http_core.c
>   Log:
>   Fix  parsing; "GET" and "get" are distinct methods.

Note that this introduces a security problem in that many users use
something other than the uppercase method name in their config files.
Previously it worked; this will magically stop authentication from being
required for them.  That is bad.



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

1998-08-08 Thread jim
jim 98/08/08 06:26:07

  Modified:src  CHANGES
   src/main http_core.c http_request.c
  Log:
  Knowing that a process is in DNS or logging
  "mode" is good information and the performance hit is minimal since
  these are "expensive" operations anyway, so enable these even without
  STATUS
  
  Revision  ChangesPath
  1.1011+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1010
  retrieving revision 1.1011
  diff -u -r1.1010 -r1.1011
  --- CHANGES   1998/08/07 15:35:45 1.1010
  +++ CHANGES   1998/08/08 13:26:04 1.1011
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.2
   
  +  *) Make status module aware of DNS and logging states, even if
  + STATUS not defined.  [Jim Jagielski]
  +
 *) Fix a problem with the new OS/2 mutexes.  [Brian Havard]
   
 *) Enhance mod_spelling so that CheckSpelling can be used in
  
  
  
  1.218 +0 -6  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.217
  retrieving revision 1.218
  diff -u -r1.217 -r1.218
  --- http_core.c   1998/08/06 19:23:46 1.217
  +++ http_core.c   1998/08/08 13:26:06 1.218
  @@ -555,9 +555,7 @@
   struct in_addr *iaddr;
   struct hostent *hptr;
   int hostname_lookups;
  -#ifdef STATUS
   int old_stat = SERVER_DEAD;  /* we shouldn't ever be in this state */
  -#endif
   
   /* If we haven't checked the host name, and we want to */
   if (dir_config) {
  @@ -577,10 +575,8 @@
&& conn->remote_host == NULL
&& (type == REMOTE_DOUBLE_REV
|| hostname_lookups != HOSTNAME_LOOKUP_OFF)) {
  -#ifdef STATUS
old_stat = ap_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);
if (hptr != NULL) {
  @@ -605,12 +601,10 @@
return NULL;
}
   }
  -#ifdef STATUS
   if (old_stat != SERVER_DEAD) {
(void)ap_update_child_status(conn->child_num, old_stat,
 (request_rec*)NULL);
   }
  -#endif /* STATUS */
   
   /*
* Return the desired information; either the remote DNS name, if found,
  
  
  
  1.128 +2 -4  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.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- http_request.c1998/08/06 17:30:31 1.127
  +++ http_request.c1998/08/08 13:26:06 1.128
  @@ -1180,18 +1180,16 @@
   
   void ap_process_request(request_rec *r)
   {
  -#ifdef STATUS
   int old_stat;
   
  +#ifdef STATUS
   ap_time_process_request(r->connection->child_num, START_PREQUEST);
   #endif
   
   process_request_internal(r);
   
  -#ifdef STATUS
   old_stat = ap_update_child_status(r->connection->child_num,
  SERVER_BUSY_LOG, r);
  -#endif
   
   /*
* We want to flush the last packet if this isn't a pipelining connection
  @@ -1203,8 +1201,8 @@
   ap_bhalfduplex(r->connection->client);
   ap_log_transaction(r);
   
  -#ifdef STATUS
   (void) ap_update_child_status(r->connection->child_num, old_stat, r);
  +#ifdef STATUS
   ap_time_process_request(r->connection->child_num, STOP_PREQUEST);
   #endif
   }
  
  
  


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

1998-08-26 Thread dougm
dougm   98/08/26 13:01:26

  Modified:src  CHANGES
   src/include http_core.h
   src/main http_core.c http_main.c
  Log:
  new `GprofDir' directive when compiled with -DGPROF, where gprof can
  plop gmon.out profile data for each child
  Submitted by: Doug MacEachern
  Reviewed by:  Dean Gaudet
  
  Revision  ChangesPath
  1.1037+3 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1036
  retrieving revision 1.1037
  diff -u -r1.1036 -r1.1037
  --- CHANGES   1998/08/25 10:51:49 1.1036
  +++ CHANGES   1998/08/26 20:01:19 1.1037
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.2
   
  +  *) new `GprofDir' directive when compiled with -DGPROF, where gprof can
  + plop gmon.out profile data for each child [Doug MacEachern]
  +   
 *) Use the construct ``"$@"'' instead of ``$*'' in the generated
config.status script to be immune against arguments with whitespaces.
[Yves Arrouye <[EMAIL PROTECTED]>] PR#2866
  
  
  
  1.48  +4 -0  apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- http_core.h   1998/08/10 04:16:13 1.47
  +++ http_core.h   1998/08/26 20:01:21 1.48
  @@ -253,6 +253,10 @@
   
   typedef struct {
 
  +#ifdef GPROF
  +char *gprof_dir;
  +#endif
  +
   /* Name translations --- we want the core to be able to do *something*
* so it's at least a minimally functional web server on its own (and
* can be tested that way).  But let's keep it to the bare minimum:
  
  
  
  1.225 +24 -0 apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.224
  retrieving revision 1.225
  diff -u -r1.224 -r1.225
  --- http_core.c   1998/08/11 15:37:52 1.224
  +++ http_core.c   1998/08/26 20:01:22 1.225
  @@ -271,6 +271,9 @@
   int is_virtual = s->is_virtual;
 
   conf = (core_server_config *)ap_pcalloc(a, sizeof(core_server_config));
  +#ifdef GPROF
  +conf->gprof_dir = NULL;
  +#endif
   conf->access_name = is_virtual ? NULL : DEFAULT_ACCESS_FNAME;
   conf->ap_document_root = is_virtual ? NULL : DOCUMENT_LOCATION;
   conf->sec = ap_make_array(a, 40, sizeof(void *));
  @@ -793,6 +796,23 @@
   return NULL;
   }
   
  +#ifdef GPROF
  +static const char *set_gprof_dir(cmd_parms *cmd, void *dummy, char *arg)
  +{
  +void *sconf = cmd->server->module_config;
  +core_server_config *conf = ap_get_module_config(sconf, &core_module);
  +
  +const char *err = ap_check_cmd_context(cmd,
  +NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
  +if (err != NULL) {
  +return err;
  +}
  +
  +conf->gprof_dir = ap_pstrdup(cmd->pool, arg);
  +return NULL;
  +}
  +#endif /*GPROF*/
  +
   static const char *set_document_root(cmd_parms *cmd, void *dummy, char *arg)
   {
   void *sconf = cmd->server->module_config;
  @@ -2458,6 +2478,10 @@
 "Selects which authenticated users or groups may access a protected space" 
},
   { "Satisfy", satisfy, NULL, OR_AUTHCFG, TAKE1,
 "access policy if both allow and require used ('all' or 'any')" },
  +#ifdef GPROF
  +{ "GprofDir", set_gprof_dir, NULL, RSRC_CONF, TAKE1,
  +  "Directory to plop gmon.out files" },
  +#endif
   
   /* Old resource config file commands */
 
  
  
  
  1.388 +37 -0 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.387
  retrieving revision 1.388
  diff -u -r1.387 -r1.388
  --- http_main.c   1998/08/13 01:55:06 1.387
  +++ http_main.c   1998/08/26 20:01:22 1.388
  @@ -414,6 +414,42 @@
   
   static APACHE_TLS int volatile exit_after_unblock = 0;
   
  +#ifdef GPROF
  +/* 
  + * change directory for gprof to plop the gmon.out file
  + * configure in httpd.conf:
  + * GprofDir logs/   -> $ServerRoot/logs/gmon.out
  + * GprofDir logs/%  -> $ServerRoot/logs/gprof.$pid/gmon.out
  + */
  +static void chdir_for_gprof()
  +{
  +core_server_config *sconf = 
  + ap_get_module_config(server_conf->module_config, &core_module);
  +char *dir = sconf->gprof_dir;
  +
  +if(dir) {
  + char buf[512];
  + int len = strlen(sconf->gprof_dir) - 1;
  + if(*(dir + len) == '%') {
  + dir[len] = '\0';
  + ap_snprintf(buf, sizeof(buf), "%sgprof.%d", dir, (int)getpid());
  + } 
  + dir = ap_serv

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

1998-10-23 Thread coar
coar98/10/23 12:06:29

  Modified:src  CHANGES
   src/main http_core.c util.c
  Log:
Fix some more Win32-only problems: treat "{.*/}nul" on Win32
the way we do "/dev/null" on Unix, and mention the inapplicability
of the User directive if encountered on Win32.
  
  PR:   2078, 2303
  Submitted by: Ken Parzygnat <[EMAIL PROTECTED]>
  Reviewed by:  Ken Coar
  
  Revision  ChangesPath
  1.1121+6 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1120
  retrieving revision 1.1121
  diff -u -r1.1120 -r1.1121
  --- CHANGES   1998/10/23 08:32:25 1.1120
  +++ CHANGES   1998/10/23 19:06:24 1.1121
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3.4
   
  +  *) Properly handle & allow "nul" and ".*/null" in AccessConfig and
  + ResourceConfig directives on Win32.  Also add a note to the effect
  + of 'useless User directive ignored on Win32' to the errorlog if
  + a User directive is encountered on Win32.
  + [Ken Parzygnat <[EMAIL PROTECTED]>] PR#2078, 2303.
  +
 *) Fix multiple whitespace handling in imagemaps for mod_imap which was
broken since Apache 1.3.1 where we took out compressing of multiple
spaces in ap_cfg_getline().
  
  
  
  1.236 +6 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.235
  retrieving revision 1.236
  diff -u -r1.235 -r1.236
  --- http_core.c   1998/10/21 05:57:53 1.235
  +++ http_core.c   1998/10/23 19:06:26 1.236
  @@ -1665,6 +1665,11 @@
   
   static const char *set_user(cmd_parms *cmd, void *dummy, char *arg)
   {
  +#ifdef WIN32
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, cmd->server,
  +  "User directive has no affect on Win32");
  +cmd->server->server_uid = ap_user_id = 1;
  +#else
   const char *err = ap_check_cmd_context(cmd, 
NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
   if (err != NULL) {
   return err;
  @@ -1700,6 +1705,7 @@
exit (1);
   }
   #endif
  +#endif /* WIN32 */
   
   return NULL;
   }
  
  
  
  1.136 +3 -1  apache-1.3/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/util.c,v
  retrieving revision 1.135
  retrieving revision 1.136
  diff -u -r1.135 -r1.136
  --- util.c1998/10/10 00:40:07 1.135
  +++ util.c1998/10/23 19:06:27 1.136
  @@ -760,7 +760,9 @@
   if (fstat(fileno(file), &stbuf) == 0 &&
   !S_ISREG(stbuf.st_mode) &&
   #ifdef WIN32
  -strcasecmp(name, "nul") != 0) {
  +!(strcasecmp(name, "nul") == 0 ||
  +  (strlen(name) >= 4 &&
  +   strcasecmp(name + strlen(name) - 4, "/nul") == 0))) {
   #else
   strcmp(name, "/dev/null") != 0) {
   #endif
  
  
  


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

1998-03-14 Thread dgaudet
dgaudet 98/03/13 16:03:41

  Modified:src/main http_core.c http_protocol.c util_script.c
  Log:
  a few less pstrdup
  
  Revision  ChangesPath
  1.170 +6 -6  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.169
  retrieving revision 1.170
  diff -u -r1.169 -r1.170
  --- http_core.c   1998/03/13 19:20:14 1.169
  +++ http_core.c   1998/03/14 00:03:37 1.170
  @@ -1267,7 +1267,7 @@
   const char *err = check_cmd_context(cmd, 
NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
   if (err != NULL) return err;
   
  -*(char **)(struct_ptr + offset) = pstrdup (cmd->pool, arg);
  +*(char **)(struct_ptr + offset) = arg;
   return NULL;
   }
   
  @@ -1335,7 +1335,7 @@
   if (err != NULL) return err;
   
   if (!cmd->server->is_virtual) {
  - user_name = pstrdup (cmd->pool, arg);
  + user_name = arg;
cmd->server->server_uid = user_id = uname2id(arg);
   }
   else {
  @@ -1444,7 +1444,7 @@
   
   if (cmd->server->is_virtual)
return "PidFile directive not allowed in ";
  -pid_fname = pstrdup (cmd->pool, arg);
  +pid_fname = arg;
   return NULL;
   }
   
  @@ -1453,7 +1453,7 @@
   const char *err = check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) return err;
   
  -scoreboard_fname = pstrdup (cmd->pool, arg);
  +scoreboard_fname = arg;
   return NULL;
   }
   
  @@ -1462,7 +1462,7 @@
   const char *err = check_cmd_context(cmd, GLOBAL_ONLY);
   if (err != NULL) return err;
   
  -lock_fname = pstrdup (cmd->pool, arg);
  +lock_fname = arg;
   return NULL;
   }
   
  @@ -1498,7 +1498,7 @@
   const char *err = check_cmd_context(cmd, 
NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
   if (err != NULL) return err;
   
  -cmd->server->path = pstrdup (cmd->pool, arg);
  +cmd->server->path = arg;
   cmd->server->pathlen = strlen (arg);
   return NULL;
   }
  
  
  
  1.197 +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.196
  retrieving revision 1.197
  diff -u -r1.196 -r1.197
  --- http_protocol.c   1998/03/13 07:12:54 1.196
  +++ http_protocol.c   1998/03/14 00:03:38 1.197
  @@ -1888,7 +1888,7 @@
   int status = r->status;
   int idx = index_of_response(status);
   char *custom_response;
  -char *location = pstrdup(r->pool, table_get(r->headers_out, "Location"));
  +char *location = table_get(r->headers_out, "Location");
   
   /* We need to special-case the handling of 204 and 304 responses,
* since they have specific HTTP requirements and do not include a
  
  
  
  1.102 +7 -7  apache-1.3/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/util_script.c,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- util_script.c 1998/03/12 10:28:58 1.101
  +++ util_script.c 1998/03/14 00:03:39 1.102
  @@ -244,7 +244,7 @@
   table_setn(e, "SERVER_PORT", pstrdup(r->pool,port));
   host = get_remote_host(c, r->per_dir_config, REMOTE_HOST);
   if (host) {
  - table_setn(e, "REMOTE_HOST", pstrdup(r->pool, host));
  + table_setn(e, "REMOTE_HOST", host);
   }
   table_setn(e, "REMOTE_ADDR", c->remote_ip);
   table_setn(e, "DOCUMENT_ROOT", document_root(r));/* Apache */
  @@ -477,13 +477,13 @@
r->status_line = pstrdup(r->pool, l);
}
else if (!strcasecmp(w, "Location")) {
  - table_setn(r->headers_out, pstrdup(r->pool,w), pstrdup(r->pool,l));
  + table_set(r->headers_out, w, l);
}
else if (!strcasecmp(w, "Content-Length")) {
  - table_setn(r->headers_out, pstrdup(r->pool,w), pstrdup(r->pool,l));
  + table_set(r->headers_out, w, l);
}
else if (!strcasecmp(w, "Transfer-Encoding")) {
  - table_setn(r->headers_out, pstrdup(r->pool,w), pstrdup(r->pool,l));
  + table_set(r->headers_out, w, l);
}
/*
 * If the script gave us a Last-Modified header, we can't just
  @@ -500,7 +500,7 @@
 * we'll use - otherwise we assume 200 OK.
 */
else if (!strcasecmp(w, "Status")) {
  - table_setn(r->headers_out, pstrdup(r->pool,w), pstrdup(r->pool,l));
  + table_set(r->headers_out, w, l);
cgi_status = atoi(l);
}
   
  @@ -510,10 +510,10 @@
 * separately.  Lets humour those browsers.
 */
else if (!strcasecmp(w, "Set-Cookie")) {
  - table_addn(r->err_headers_out, pstrdup(r->pool,w), 
pstrdup(r-

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

1998-10-15 Thread coar
coar98/10/15 00:58:26

  Modified:src/include http_core.h
   src/main http_core.c http_protocol.c http_request.c
  Log:
Add a keyword to the Options directive that enables the display
of error-notes text in server-generated 500 status pages.  By
default, this information will not be included any more (several
reports of this exposing sensitive information, so our users
don't like it regardless of our opinions).  Adding
"Options DebugServerErrors" will enable it.  The keyword is
only a placeholder until we come up with a better name.
In addition, the type of allow_options_t has been changed
from a char to an int; I don't think this warrants an MMN
bump because a) that's a core-private type, and b) access to
the information is through ap_allow_options(), which extends it
to an int anyway.
This patch also fixes the problem of partial per-dir config
merges if a parse error occurs somewhere in an .htaccess file
in the tree.  One instruction of additional overhead, and now
.htaccess files with ErrorDocument 500 will work properly
for subordinate directories.
  
  PR:   2409, 3173
  
  Revision  ChangesPath
  1.49  +3 -2  apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- http_core.h   1998/08/26 20:01:21 1.48
  +++ http_core.h   1998/10/15 07:58:23 1.49
  @@ -83,6 +83,7 @@
   #define OPT_INCNOEXEC 32
   #define OPT_SYM_OWNER 64
   #define OPT_MULTI 128
  +#define OPT_DEBUG500 256
   #define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_SYM_LINKS|OPT_EXECCGI)
   
   /* options for get_remote_host() */
  @@ -156,7 +157,7 @@
   /*
* Core is also unlike other modules in being implemented in more than
* one file... so, data structures are declared here, even though most of
  - * the code that cares really is in http_core.c.  Also, anothre accessor.
  + * the code that cares really is in http_core.c.  Also, another accessor.
*/
   
   char *ap_response_code_string (request_rec *r, int error_index);
  @@ -165,7 +166,7 @@
   
   /* Per-directory configuration */
   
  -typedef unsigned char allow_options_t;
  +typedef unsigned int allow_options_t;
   typedef unsigned char overrides_t;
   
   typedef struct {
  
  
  
  1.233 +3 -0  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.232
  retrieving revision 1.233
  diff -u -r1.232 -r1.233
  --- http_core.c   1998/10/01 04:52:28 1.232
  +++ http_core.c   1998/10/15 07:58:23 1.233
  @@ -994,6 +994,9 @@
else if (!strcasecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
opt = OPT_MULTI|OPT_EXECCGI;
}
  + else if (!strcasecmp(w, "DebugServerErrors")) {
  + opt = OPT_DEBUG500;
  + }
else if (!strcasecmp(w, "None")) {
opt = OPT_NONE;
}
  
  
  
  1.244 +3 -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.243
  retrieving revision 1.244
  diff -u -r1.243 -r1.244
  --- http_protocol.c   1998/10/06 19:06:09 1.243
  +++ http_protocol.c   1998/10/15 07:58:24 1.244
  @@ -2385,7 +2385,9 @@
 " and inform them of the time the error occurred,\n"
 "and anything you might have done that may have\n"
 "caused the error.\n", NULL);
  - if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) {
  + if ((ap_allow_options(r) & OPT_DEBUG500)
  +&& (error_notes = ap_table_get(r->notes, "error-notes"))
  +!= NULL) {
ap_bvputs(fd, error_notes, "\n", NULL);
}
break;
  
  
  
  1.134 +6 -4  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.133
  retrieving revision 1.134
  diff -u -r1.133 -r1.134
  --- http_request.c1998/10/06 19:06:09 1.133
  +++ http_request.c1998/10/15 07:58:24 1.134
  @@ -464,10 +464,12 @@
   if (res)
   return res;
   
  -if (htaccess_conf)
  -per_dir_defaults =
  -ap_merge_per_dir_configs(r->pool, per_dir_defaults,
  -  htaccess_conf);
  +if