cvs commit: apache/src http_request.c

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

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


cvs commit: apache/src http_request.c

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

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


cvs commit: apache/src http_request.c

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

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

  
  
  


cvs commit: apache/src http_request.c

1997-08-01 Thread Dean Gaudet
dgaudet 97/08/01 01:01:22

  Modified:src   http_request.c
  Log:
  Fix a bug introduced by a bug fix during the 1.2 betas: if there are
  multiple s that match, all are applied... that's the bug that
  was fixed during 1.2bX.  But it didn't reset this_conf to NULL, so as
  soon as one match was found, it would be merged over and over again.
  
  Revision  ChangesPath
  1.67  +2 -1  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- http_request.c1997/07/20 18:52:41 1.66
  +++ http_request.c1997/08/01 08:01:21 1.67
  @@ -349,7 +349,7 @@
   core_dir_config *core_dir =
  (core_dir_config *)get_module_config(per_dir_defaults, &core_module);
int overrides_here;
  -void *this_conf = NULL, *htaccess_conf = NULL;
  +void *this_conf, *htaccess_conf = NULL;
char *test_dirname_tail;
int j;
   
  @@ -380,6 +380,7 @@
  (core_dir_config *)get_module_config(entry_config, &core_module);
entry_dir = entry_core->d;

  + this_conf = NULL;
if (entry_core->r) {
if (!regexec(entry_core->r, test_dirname, 0, NULL,
 (j == num_sec) ? 0 : REG_NOTEOL)) {
  
  
  


cvs commit: apache/src http_request.c

1997-07-19 Thread Dean Gaudet
dgaudet 97/07/19 01:03:54

  Modified:src   http_request.c
  Log:
  add a comment about proxy auth
  
  Revision  ChangesPath
  1.64  +4 -0  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -C3 -r1.63 -r1.64
  *** http_request.c1997/07/19 08:02:04 1.63
  --- http_request.c1997/07/19 08:03:53 1.64
  ***
  *** 790,795 
  --- 790,799 
char *custom_response = response_code_string(r, error_index);
int recursive_error = 0;

  + /* This test is done here so that none of the auth modules needs to
  +  * know about proxy authentication.  They treat it like normal auth,
  +  * and then we tweak the status.
  +  */
if (r->status == AUTH_REQUIRED && r->proxyreq) {
r->status = HTTP_PROXY_AUTHENTICATION_REQUIRED;
}
  
  
  


cvs commit: apache/src http_request.c

1997-07-13 Thread Dean Gaudet
dgaudet 97/07/13 19:32:11

  Modified:src   http_request.c
  Log:
  Deal with chunking when a DONE is returned.
  
  Submitted by: Rob Hartill
  Reviewed by:  Jim Jagielski, Randy Terbush
  
  Revision  ChangesPath
  1.61  +5 -2  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -C3 -r1.60 -r1.61
  *** http_request.c1997/07/13 19:01:13 1.60
  --- http_request.c1997/07/14 02:32:10 1.61
  ***
  *** 788,795 
char *custom_response = response_code_string(r, error_index);
int recursive_error = 0;

  ! if (type == DONE) return;
  ! 
/* The following takes care of Apache redirects to custom response URLs
 * Note that if we are already dealing with the response to some other
 * error condition, we just report on the original error, and give up on
  --- 788,798 
char *custom_response = response_code_string(r, error_index);
int recursive_error = 0;

  ! if (type == DONE) {
  ! finalize_request_protocol(r);
  ! return;
  ! }
  ! 
/* The following takes care of Apache redirects to custom response URLs
 * Note that if we are already dealing with the response to some other
 * error condition, we just report on the original error, and give up on
  
  
  


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

1997-07-07 Thread Dean Gaudet
dgaudet 97/07/07 19:09:37

  Modified:src   http_request.c http_request.h
  Log:
  Add is_initial_request function.
  
  Revision  ChangesPath
  1.59  +12 -0 apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -C3 -r1.58 -r1.59
  *** http_request.c1997/07/08 02:04:44 1.58
  --- http_request.c1997/07/08 02:09:36 1.59
  ***
  *** 1131,1133 
  --- 1131,1145 
new->content_type = r->content_type;
process_request_internal (new);
}
  + 
  + /* if we return TRUE here, 
  +  * it is the initial main request, which we only get *once* per HTTP 
request 
  +  */
  + 
  + int is_initial_req(request_rec *r)
  + {
  + return
  + (r->main == NULL) /* otherwise, this is a sub-request */
  + &&
  + (r->prev == NULL); /* otherwise, this is an internal redirect */
  + }
  
  
  
  1.11  +1 -0  apache/src/http_request.h
  
  Index: http_request.h
  ===
  RCS file: /export/home/cvs/apache/src/http_request.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -C3 -r1.10 -r1.11
  *** http_request.h1997/01/01 18:10:22 1.10
  --- http_request.h1997/07/08 02:09:36 1.11
  ***
  *** 84,89 
  --- 84,90 
void internal_redirect (const char *new_uri, request_rec *); 
void internal_redirect_handler (const char *new_uri, request_rec *);
int some_auth_required (request_rec *r);
  + int is_initial_req(request_rec *r);

#ifdef CORE_PRIVATE
/* Function called by main.c to handle first-level request */
  
  
  


cvs commit: apache/src http_request.c mod_cern_meta.c mod_dir.c

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

  Modified:src   Tag: APACHE_1_2_X  http_request.c mod_cern_meta.c
mod_dir.c
  Log:
  Ugh I messed up the security fixes commit.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.50.2.1  +41 -4 apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.50
  retrieving revision 1.50.2.1
  diff -C3 -r1.50 -r1.50.2.1
  *** http_request.c1997/05/14 19:22:52 1.50
  --- http_request.c1997/06/27 02:21:21 1.50.2.1
  ***
  *** 85,90 
  --- 85,108 
 * they change, all the way down.
 */

  + 
  + /*
  +  * We don't want people able to serve up pipes, or unix sockets, or other
  +  * scary things.  Note that symlink tests are performed later.
  +  */
  + static int check_safe_file(request_rec *r)
  + {
  + if (r->finfo.st_mode == 0   /* doesn't exist */
  + || S_ISDIR (r->finfo.st_mode)
  + || S_ISREG (r->finfo.st_mode)
  + || S_ISLNK (r->finfo.st_mode)) {
  + return OK;
  + }
  + log_reason("object is not a file, directory or symlink", r->filename, 
r);
  + return HTTP_FORBIDDEN;
  + }
  + 
  + 
int check_symlinks (char *d, int opts)
{
struct stat lfi, fi;
  ***
  *** 310,320 
if (res != OK) {
return res;
}
  ! 
if (test_filename[strlen(test_filename)-1] == '/')
--num_dirs;

  ! if (S_ISDIR (r->finfo.st_mode)) ++num_dirs;

for (i = 1; i <= num_dirs; ++i) {
core_dir_config *core_dir =
  --- 328,344 
if (res != OK) {
return res;
}
  ! 
  ! if ((res = check_safe_file(r))) {
  ! return res;
  ! }
  ! 
if (test_filename[strlen(test_filename)-1] == '/')
--num_dirs;

  ! if (S_ISDIR (r->finfo.st_mode)) {
  ! ++num_dirs;
  ! }

for (i = 1; i <= num_dirs; ++i) {
core_dir_config *core_dir =
  ***
  *** 399,406 

r->per_dir_config = per_dir_defaults;

  ! if ((res = check_symlinks (r->filename, allow_options(r
  ! {
log_reason("Symbolic link not allowed", r->filename, r);
return res;
}
  --- 423,438 

r->per_dir_config = per_dir_defaults;

  ! /* Symlink permissions are determined by the parent.  If the request is 
for
  !  * a directory then applying the symlink test here would use the
  !  * permissions of the directory as opposed to its parent.  Consider a
  !  * symlink pointing to a dir with a .htaccess disallowing symlinks.  If 
you
  !  * access /symlink (or /symlink/) you would get a 403 without this 
S_ISDIR
  !  * test.  But if you accessed /symlink/index.html, for example, you 
would
  !  * *not* get the 403.
  !  */
  ! if (!S_ISDIR (r->finfo.st_mode)
  ! && (res = check_symlinks (r->filename, allow_options(r {
log_reason("Symbolic link not allowed", r->filename, r);
return res;
}
  ***
  *** 667,672 
  --- 699,709 
rnew->filename = make_full_path (rnew->pool, fdir, new_file);
if (stat (rnew->filename, &rnew->finfo) < 0) {
rnew->finfo.st_mode = 0;
  + }
  + 
  + if ((res = check_safe_file(rnew))) {
  + rnew->status = res;
  + return rnew;
}

rnew->per_dir_config = r->per_dir_config;
  
  
  
  1.10.2.1  +14 -20apache/src/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_cern_meta.c,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -C3 -r1.10 -r1.10.2.1
  *** mod_cern_meta.c   1997/03/07 14:15:39 1.10
  --- mod_cern_meta.c   1997/06/27 02:21:22 1.10.2.1
  ***
  *** 131,136 
  --- 131,137 
#include 
#include "util_script.h"
#include "http_log.h"
  + #include "http_request.h"

#define DEFAULT_METADIR ".web"
#define DEFAULT_METASUFFIX  ".meta"
  ***
  *** 238,247 
char *last_slash;
char *real_file;
char *scrap_book;
  - struct stat meta_stat;
FILE *f;   
cern_meta_config *cmc ;
int rv;

cmc = get_module_config (r->server->module_config,
   &cern_meta_module); 
  --- 239,248 
char *last_slash;
char *real_file;
char *scrap_book;
FILE *f;   
cern_meta_config *cmc ;
int rv;
  + request_rec *rr;

cmc = get_module_config (r->server->module_config,
   &cern_meta_module); 
  ***
  *** 276,305 

metafilename = 

cvs commit: apache/src http_request.c

1997-02-20 Thread Roy Fielding
fielding97/02/20 16:22:30

  Modified:src   http_request.c
  Log:
  We do not want TRACE to bypass a proxy request, since the proxy is
  supposed to pass it on following the rules in RFC 2068.  The code
  is currently failing to respond correctly to full-URIs if there is
  no proxy module compiled-in, but that's a different problem.
  
  Revision  ChangesPath
  1.46  +9 -9  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -C3 -r1.45 -r1.46
  *** http_request.c1997/02/20 23:36:40 1.45
  --- http_request.c1997/02/21 00:22:29 1.46
  ***
  *** 870,886 
return;
}

  - /* We don't want TRACE to run through the normal handler set,
  -  * we handle it specially.
  -  */
  - if (r->method_number == M_TRACE) {
  - send_http_trace (r);
  - finalize_request_protocol (r);
  - return;
  - }
  - 
if (!r->proxyreq)
{
access_status = unescape_url(r->uri);
if (access_status)
{
  --- 870,886 
return;
}

if (!r->proxyreq)
{
  + /* We don't want TRACE to run through the normal handler set,
  +  * we handle it specially.
  +  */
  + if (r->method_number == M_TRACE) {
  + send_http_trace(r);
  + finalize_request_protocol(r);
  + return;
  + }
  + 
access_status = unescape_url(r->uri);
if (access_status)
{
  
  
  


cvs commit: apache/src http_request.c

1997-02-17 Thread Marc Slemko
marc97/02/17 12:16:18

  Modified:src   http_request.c
  Log:
  Fix indenting to be somewhat consistent with surrounding source; now
  indented correctly with something other than ts=6.
  
  Revision  ChangesPath
  1.44  +7 -7  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -C3 -r1.43 -r1.44
  *** http_request.c1997/02/17 10:46:07 1.43
  --- http_request.c1997/02/17 20:16:16 1.44
  ***
  *** 368,380 
else if (!strcmp (this_dir, entry_dir))
this_conf = entry_config;

  !   if (this_conf)
  !   {
  !   per_dir_defaults =
  !   merge_per_dir_configs (r->pool, per_dir_defaults, 
this_conf);
  !   core_dir =(core_dir_config 
*)get_module_config(per_dir_defaults,
  !&core_module);
  !   }
}

overrides_here = core_dir->override;
  --- 368,380 
else if (!strcmp (this_dir, entry_dir))
this_conf = entry_config;

  ! if (this_conf) {
  ! per_dir_defaults =
  !merge_per_dir_configs (r->pool, per_dir_defaults, this_conf);
  ! core_dir =(core_dir_config *)get_module_config(per_dir_defaults,
  !&core_module);
  ! }
  ! 
}

overrides_here = core_dir->override;
  
  
  


cvs commit: apache/src http_request.c

1997-01-25 Thread Randy Terbush
randy   97/01/25 07:44:40

  Modified:src   http_request.c
  Log:
  The below patch makes the error message a bit more standard and doesn't
  print it if the reason for stat failing was EACCES.  Should go in before
  the beta goes out.
  Reviewed by: Randy Terbush
  Submitted by: Marc Slemko
  
  Revision  ChangesPath
  1.40  +9 -2  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -C3 -r1.39 -r1.40
  *** http_request.c1997/01/20 09:30:50 1.39
  --- http_request.c1997/01/25 15:44:39 1.40
  ***
  *** 208,217 
} 
#if defined(ENOENT) && defined(ENOTDIR)
else {
  ! log_printf(r->server, "access to %s failed for client; unable to 
determine if index file exists (stat() returned unexpected error[%d])", 
r->filename, errno);
return HTTP_FORBIDDEN;
}
  ! #endif
}
return OK;
}
  --- 208,224 
} 
#if defined(ENOENT) && defined(ENOTDIR)
else {
  ! #if defined(EACCES)
  ! if (errno != EACCES) 
  ! #endif 
  ! log_printf(r->server, 
  !"access to %s failed for %s, reason: stat: %s (errno = %d)",
  !r->uri, get_remote_host(r->connection, r->per_dir_config,
  !REMOTE_NAME), strerror(errno), errno);
  ! 
return HTTP_FORBIDDEN;
}
  ! #endif /* ENOENT && ENOTDIR */
}
return OK;
}
  
  
  


cvs commit: apache/src http_request.c mod_log_config.c

1997-01-20 Thread Brian Behlendorf
brian   97/01/20 01:30:52

  Modified:src   http_request.c mod_log_config.c
  Log:
  Reviewed by:  Randy Terbush, Brian Behlendorf
  Submitted by: Dean Gaudet
  
  Two problems.  The first is that every call to make_sub_request wasn't
  copying the original request's request_time.  The second was that
  mod_log_config was defaulting to "do not want_orig" for %T (i.e. %>T was
  default not %request_time = r->request_time;
rnew->connection = r->connection; 
rnew->server = r->server;
rnew->request_config = create_request_config (rnew->pool);
  ***
  *** 684,690 

rnew = make_sub_request (r);
fdir = make_dirstr (rnew->pool, r->filename, count_dirs (r->filename));
  ! 
rnew->connection = r->connection; /* For now... */
rnew->server = r->server;
rnew->request_config = create_request_config (rnew->pool);
  --- 685,691 

rnew = make_sub_request (r);
fdir = make_dirstr (rnew->pool, r->filename, count_dirs (r->filename));
  ! rnew->request_time = r->request_time;
rnew->connection = r->connection; /* For now... */
rnew->server = r->server;
rnew->request_config = create_request_config (rnew->pool);
  
  
  
  1.24  +1 -1  apache/src/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_log_config.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -C3 -r1.23 -r1.24
  *** mod_log_config.c  1997/01/20 09:19:07 1.23
  --- mod_log_config.c  1997/01/20 09:30:50 1.24
  ***
  *** 353,359 
{ 'l', log_remote_logname, 0 },
{ 'u', log_remote_user, 0 },
{ 't', log_request_time, 0 },
  ! { 'T', log_request_duration, 0 },
{ 'r', log_request_line, 1 },
{ 'f', log_request_file, 0 },
{ 'U', log_request_uri, 1 },
  --- 353,359 
{ 'l', log_remote_logname, 0 },
{ 'u', log_remote_user, 0 },
{ 't', log_request_time, 0 },
  ! { 'T', log_request_duration, 1 },
{ 'r', log_request_line, 1 },
{ 'f', log_request_file, 0 },
{ 'U', log_request_uri, 1 },
  
  
  


cvs commit: apache/src http_request.c

1997-01-13 Thread Randy Terbush
randy   97/01/13 21:03:08

  Modified:src   http_request.c
  Log:
  Complete fix for directoryindex problem.
  Reviewed by: Marc Slemko, Sameer, Parekh, Randy Terbush
  Submitted by: Marc Slemko
  
  Revision  ChangesPath
  1.37  +8 -8  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -C3 -r1.36 -r1.37
  *** http_request.c1997/01/12 20:01:21 1.36
  --- http_request.c1997/01/14 05:03:06 1.37
  ***
  *** 177,190 
*cp = '\0';
return OK;
}
  ! #if defined(ENOENT)
  ! else if (errno == ENOENT) {
#else
  ! #error ENOENT not defined -- check the comment below this line in the 
source for details
/*
  !  * If ENOENT is not defined in one of the your OS's include
  !  * files, Apache does not know how to check to see why the
  !  * stat() of the index file failed; there are cases where
 * it can fail even though the file exists.  This means
 * that it is possible for someone to get a directory
 * listing of a directory even though there is an index
  --- 177,190 
*cp = '\0';
return OK;
}
  ! #if defined(ENOENT) && defined(ENOTDIR)
  ! else if (errno == ENOENT || errno == ENOTDIR) {
#else
  ! #error ENOENT || ENOTDIR not defined -- check the comment below this line 
in the source for details
/*
  !  * If ENOENT || ENOTDIR is not defined in one of the your OS's
  !  * include files, Apache does not know how to check to see why
  !  * the stat() of the index file failed; there are cases where
 * it can fail even though the file exists.  This means
 * that it is possible for someone to get a directory
 * listing of a directory even though there is an index
  ***
  *** 206,214 
while (cp > path && cp[-1] == '/')
--cp;
} 
  ! #if defined(ENOENT)
else {
  ! log_reason("unable to determine if index file exists (stat() 
returned unexpected error)", r->filename, r);
return HTTP_FORBIDDEN;
}
#endif
  --- 206,214 
while (cp > path && cp[-1] == '/')
--cp;
} 
  ! #if defined(ENOENT) && defined(ENOTDIR)
else {
  ! log_printf(r->server, "access to %s failed for client; unable to 
determine if index file exists (stat() returned unexpected error[%d])", 
r->filename, errno);
return HTTP_FORBIDDEN;
}
#endif
  
  
  


cvs commit: apache/src http_request.c mod_dir.c

1997-01-11 Thread Randy Terbush
randy   97/01/11 21:17:27

  Branch:  src   RELEASE_1_1_X
  Modified:src   http_request.c mod_dir.c
  Log:
  More changes to support fix for DirectoryIndex/stat() problem.
  Reviewed by: Randy Terbush
  Submitted by: Marc Slemko
  
  Revision  ChangesPath
  1.11.2.3  +1 -1  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.11.2.2
  retrieving revision 1.11.2.3
  diff -C3 -r1.11.2.2 -r1.11.2.3
  *** http_request.c1997/01/12 02:05:41 1.11.2.2
  --- http_request.c1997/01/12 05:17:24 1.11.2.3
  ***
  *** 197,203 
} 
#if defined(ENOENT)
else {
  ! log_reason("unable to determine if index file exists (stat() 
returned unexpected error)", r->filename, r);
return FORBIDDEN;
}
#endif
  --- 197,203 
} 
#if defined(ENOENT)
else {
  ! log_printf(r->server, "access to %s failed for client; unable to 
determine if index file exists (stat() returned unexpected error)", 
r->filename);
return FORBIDDEN;
}
#endif
  
  
  
  1.10.2.1  +17 -1 apache/src/mod_dir.c
  
  
  
  


cvs commit: apache/src http_request.c mod_cookies.c

1997-01-11 Thread Randy Terbush
randy   97/01/11 18:05:45

  Branch:  src   RELEASE_1_1_X
  Modified:src   http_request.c mod_cookies.c
  Log:
  Make http_request.c changes a bit more portable.
  Change Copyright dates for both files.
  
  Revision  ChangesPath
  1.11.2.2  +11 -2 apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.11.2.1
  retrieving revision 1.11.2.2
  diff -C3 -r1.11.2.1 -r1.11.2.2
  *** http_request.c1997/01/12 00:40:17 1.11.2.1
  --- http_request.c1997/01/12 02:05:41 1.11.2.2
  ***
  *** 1,6 

/* 
  !  * Copyright (c) 1995 The Apache Group.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
  --- 1,6 

/* 
  !  * Copyright (c) 1995-1997 The Apache Group.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
  ***
  *** 179,185 
  --- 179,192 
*cp = '\0';
return OK;
}
  + #if defined(ENOENT)
else if (errno == ENOENT) {
  + #else
  +   #error Your system apparently does not define ENOENT.
  +   #error Removal of these lines opens a security hole if protecting
  +   #error from directory indexes with DirectoryIndex.
  + else {
  + #endif
last_cp = cp;

while (--cp > path && *cp != '/')
  ***
  *** 188,197 
while (cp > path && cp[-1] == '/')
--cp;
} 
else {
log_reason("unable to determine if index file exists (stat() 
returned unexpected error)", r->filename, r);
  ! return HTTP_FORBIDDEN;
}
}

return OK;
  --- 195,206 
while (cp > path && cp[-1] == '/')
--cp;
} 
  + #if defined(ENOENT)
else {
log_reason("unable to determine if index file exists (stat() 
returned unexpected error)", r->filename, r);
  ! return FORBIDDEN;
}
  + #endif
}

return OK;
  
  
  
  1.9.2.3   +1 -1  apache/src/Attic/mod_cookies.c
  
  Index: mod_cookies.c
  ===
  RCS file: /export/home/cvs/apache/src/Attic/mod_cookies.c,v
  retrieving revision 1.9.2.2
  retrieving revision 1.9.2.3
  diff -C3 -r1.9.2.2 -r1.9.2.3
  *** mod_cookies.c 1997/01/12 00:45:54 1.9.2.2
  --- mod_cookies.c 1997/01/12 02:05:42 1.9.2.3
  ***
  *** 1,6 

/* 
  !  * Copyright (c) 1995, 1996 The Apache Group.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
  --- 1,6 

/* 
  !  * Copyright (c) 1995-1997 The Apache Group.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
  
  
  


cvs commit: apache/src http_request.c

1997-01-11 Thread Randy Terbush
randy   97/01/11 16:40:23

  Branch:  src   RELEASE_1_1_X
  Modified:src   http_request.c
  Log:
  Fix a problem in get_path_info() which would allow a very long URL with
  many '/' characters to convince the server to return an index for the
  DocumentRoot. Properly check errno for stat().
  Reviewed by: Randy Terbush, Ben Laurie
  Submitted by: Marc Slemko
  
  Revision  ChangesPath
  1.11.2.1  +16 -4 apache/src/http_request.c
  
  
  
  


cvs commit: apache/src http_request.c mod_log_config.c

1996-12-10 Thread Roy Fielding
fielding96/12/10 21:16:10

  Modified:src   http_request.c mod_log_config.c
  Log:
  Prior change from 1.1 to promote the status on an internal redirect
  was the wrong fix.  The real error was in the default log format in
  mod_log_config which was not really CLF.
  
  Submitted by: Rob Hartill
  Reviewed by: Ben Laurie, Roy Fielding
  
  Revision  ChangesPath
  1.32  +0 -5  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -C3 -r1.31 -r1.32
  *** http_request.c1996/12/02 15:48:26 1.31
  --- http_request.c1996/12/11 05:16:08 1.32
  ***
  *** 1008,1018 
{
request_rec *new = internal_internal_redirect(new_uri, r);
process_request_internal (new);
  - 
  - /* Promote the new redirected request result into r for logging.
  -  * We may need to promote other things, but this one is known.
  -  */
  - r->status = new->status;
}

/* This function is designed for things like actions or CGI scripts, when
  --- 1008,1013 
  
  
  
  1.18  +1 -1  apache/src/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_log_config.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -C3 -r1.17 -r1.18
  *** mod_log_config.c  1996/12/01 20:29:13 1.17
  --- mod_log_config.c  1996/12/11 05:16:08 1.18
  ***
  *** 155,161 
 *
 * --- rst */

  ! #define DEFAULT_LOG_FORMAT "%h %l %u %t \"%r\" %s %b"

#include "httpd.h"
#include "http_config.h"
  --- 155,161 
 *
 * --- rst */

  ! #define DEFAULT_LOG_FORMAT "%h %l %u %t \"%r\" %>s %b"

#include "httpd.h"
#include "http_config.h"
  
  
  


cvs commit: apache/src http_request.c

1996-12-02 Thread Roy Fielding
fielding96/12/02 07:48:28

  Modified:src   http_request.c
  Log:
  An internal redirect which results in a 304 Not Modified being sent to
  the client gets logged as a 200, because the final response code of the
  redirect is not propagated to the request structure that is logged.
  The logfile then lies about the response status, which is not good for
  a webmaster trying to diagnose problems or monitor cache hits.
  Fixed by promoting the internal redirect status.
  
  Submitted by: Ben Laurie (with comment mods by Roy Fielding)
  Reviewed by: Roy Fielding, Rob Hartill
  
  Revision  ChangesPath
  1.31  +5 -0  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -C3 -r1.30 -r1.31
  *** http_request.c1996/12/01 20:28:33 1.30
  --- http_request.c1996/12/02 15:48:26 1.31
  ***
  *** 1008,1013 
  --- 1008,1018 
{
request_rec *new = internal_internal_redirect(new_uri, r);
process_request_internal (new);
  + 
  + /* Promote the new redirected request result into r for logging.
  +  * We may need to promote other things, but this one is known.
  +  */
  + r->status = new->status;
}

/* This function is designed for things like actions or CGI scripts, when
  
  
  


cvs commit: apache/src http_request.c

1996-12-01 Thread Roy Fielding
fielding96/12/01 06:33:50

  Modified:src   http_request.c
  Log:
  On an internal redirect (particularly for an ErrorDocument handler),
  store the original method in the subprocess environment so that it
  will be noted as REDIRECT_REQUEST_METHOD for any subprocess script.
  This is to avoid serving a full response on a HEAD request that has
  been redirected to a special handler.  [Roy thinks that this would be
  better just redirecting as a HEAD request, but this fix is probably needed
  for other methods anyway.]
  
  Submitted by: Rob Hartill
  Reviewed by: Brian Behlendorf, Chuck Murcko, Roy Fielding
  
  Revision  ChangesPath
  1.29  +1 -0  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -C3 -r1.28 -r1.29
  *** http_request.c1996/11/18 19:40:48 1.28
  --- http_request.c1996/12/01 14:33:49 1.29
  ***
  *** 738,743 
  --- 738,744 
/* This redirect needs to be a GET no matter what the original
 * method was.
 */
  + table_set(r->subprocess_env, "REQUEST_METHOD", r->method);
r->method = pstrdup(r->pool, "GET");
r->method_number = M_GET;
internal_redirect (custom_response, r);
  
  
  


cvs commit: apache/src http_request.c

1996-10-19 Thread Ben Laurie
ben 96/10/19 08:17:07

  Modified:src   http_request.c
  Log:
  Apply  sections before name translation.
  
  Revision  ChangesPath
  1.22  +19 -2 apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -C3 -r1.21 -r1.22
  *** http_request.c1996/10/19 14:44:39 1.21
  --- http_request.c1996/10/19 15:17:06 1.22
  ***
  *** 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.21 1996/10/19 14:44:39 ben Exp $ */

/*
 * http_request.c: functions to get and process requests
  --- 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.22 1996/10/19 15:17:06 ben Exp $ */

/*
 * http_request.c: functions to get and process requests
  ***
  *** 567,572 
  --- 567,573 
rnew->server = r->server;
rnew->request_config = create_request_config (rnew->pool);
rnew->htaccess = r->htaccess; /* copy htaccess cache */
  + rnew->per_dir_config=r->server->lookup_defaults;
set_sub_req_protocol (rnew, r);

if (new_file[0] == '/')
  ***
  *** 587,592 
  --- 588,598 

getparents (rnew->uri);

  + if ((res = location_walk (rnew))) {
  + rnew->status=res;
  + return rnew;
  + }
  + 
res = translate_name(rnew);
if (res)
{
  ***
  *** 600,605 
  --- 606,613 
 * of translate_name.
 * Instead we rely on the cache of .htaccess results.
 */
  + /* NB: directory_walk() clears the per_dir_config, so we don't inherit 
from
  +location_walk() above */

if ((res = directory_walk (rnew))
|| (res = file_walk (rnew))
  ***
  *** 776,781 
  --- 784,790 
void process_request_internal (request_rec *r)
{
int access_status;
  + void *save_per_dir_config;
  
/* Kludge to be reading the assbackwards field outside of protocol.c,
 * but we've got to check for this sort of nonsense somewhere...
  ***
  *** 816,826 
getparents(r->uri); /* OK --- shrinking transformations... */
}

if ((access_status = translate_name (r))) {
decl_die (access_status, "translate", r);
return;
}
  ! 
if ((access_status = directory_walk (r))) {
die (access_status, r);
return;
  --- 825,843 
getparents(r->uri); /* OK --- shrinking transformations... */
}

  + if ((access_status = location_walk (r))) {
  + die (access_status, r);
  + return;
  + }
  + 
if ((access_status = translate_name (r))) {
decl_die (access_status, "translate", r);
return;
}
  ! 
  ! /* NB: directory_walk() clears the per_dir_config, so we don't inherit 
from
  !location_walk() above */
  ! 
if ((access_status = directory_walk (r))) {
die (access_status, r);
return;
  
  
  


cvs commit: apache/src http_request.c

1996-10-19 Thread Ben Laurie
ben 96/10/19 07:44:40

  Modified:src   http_request.c
  Log:
  Process  after .
  Reviewed by: Alexei Kosut, Roy Fielding, Jim Jagielski
  
  Revision  ChangesPath
  1.21  +7 -7  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -C3 -r1.20 -r1.21
  *** http_request.c1996/10/19 14:20:20 1.20
  --- http_request.c1996/10/19 14:44:39 1.21
  ***
  *** 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.20 1996/10/19 14:20:20 ben Exp $ */

/*
 * http_request.c: functions to get and process requests
  --- 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.21 1996/10/19 14:44:39 ben Exp $ */

/*
 * http_request.c: functions to get and process requests
  ***
  *** 602,609 
 */

if ((res = directory_walk (rnew))
  - || (res = location_walk (rnew))
|| (res = file_walk (rnew))
|| (!some_auth_required (rnew) ? 0 :
 ((res = check_user_id (rnew)) || (res = check_auth (rnew
|| (res = check_access (rnew))
  --- 602,609 
 */

if ((res = directory_walk (rnew))
|| (res = file_walk (rnew))
  + || (res = location_walk (rnew))
|| (!some_auth_required (rnew) ? 0 :
 ((res = check_user_id (rnew)) || (res = check_auth (rnew
|| (res = check_access (rnew))
  ***
  *** 826,840 
return;
}   

  - if ((access_status = location_walk (r))) {
  - die (access_status, r);
  - return;
  - }   
  - 
if ((access_status = file_walk (r))) {
die (access_status, r);
return;
}

if ((access_status = check_access (r)) != 0) {
decl_die (access_status, "check access", r);
  --- 826,840 
return;
}   

if ((access_status = file_walk (r))) {
die (access_status, r);
return;
}
  + 
  + if ((access_status = location_walk (r))) {
  + die (access_status, r);
  + return;
  + }   

if ((access_status = check_access (r)) != 0) {
decl_die (access_status, "check access", r);
  
  
  


cvs commit: apache/src http_request.c

1996-10-19 Thread Ben Laurie
ben 96/10/19 07:20:22

  Modified:src   http_request.c
  Log:
  Correct miscounting of directories.
  Submitted by: Paul Sutton
  
  Revision  ChangesPath
  1.20  +5 -1  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -C3 -r1.19 -r1.20
  *** http_request.c1996/10/19 10:07:43 1.19
  --- http_request.c1996/10/19 14:20:20 1.20
  ***
  *** 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.19 1996/10/19 10:07:43 ben Exp $ */

/*
 * http_request.c: functions to get and process requests
  --- 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.20 1996/10/19 14:20:20 ben Exp $ */

/*
 * http_request.c: functions to get and process requests
  ***
  *** 270,277 
  --- 270,281 

no2slash (test_filename);
num_dirs = count_dirs(test_filename);
  + 
get_path_info (r);

  + if (test_filename[strlen(test_filename)-1] == '/')
  + --num_dirs;
  + 
if (S_ISDIR (r->finfo.st_mode)) ++num_dirs;

for (i = 1; i <= num_dirs; ++i) {
  
  
  


cvs commit: apache/src http_request.c

1996-10-19 Thread Ben Laurie
ben 96/10/19 03:07:44

  Modified:src   http_request.c
  Log:
  Remove pointless location_walk().
  
  Revision  ChangesPath
  1.19  +1 -2  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -C3 -r1.18 -r1.19
  *** http_request.c1996/10/16 23:24:34 1.18
  --- http_request.c1996/10/19 10:07:43 1.19
  ***
  *** 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.18 1996/10/16 23:24:34 fielding Exp $ */

/*
 * http_request.c: functions to get and process requests
  --- 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.19 1996/10/19 10:07:43 ben Exp $ */

/*
 * http_request.c: functions to get and process requests
  ***
  *** 642,648 
  make_full_path (rnew->pool, fdir, new_file));

if ((res = directory_walk (rnew))
  - || (res = location_walk (rnew))
|| (res = file_walk (rnew))
|| (res = check_access (rnew))
|| (!some_auth_required (rnew) ? 0 :
  --- 642,647 
  
  
  


cvs commit: apache/src http_request.c

1996-10-16 Thread Ben Laurie
ben 96/10/16 10:29:23

  Modified:src   http_request.c
  Log:
  Add missing location_walk()s.
  Reviewed by: Alexei Kosut
  
  Revision  ChangesPath
  1.17  +3 -1  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -C3 -r1.16 -r1.17
  *** http_request.c1996/10/08 20:43:31 1.16
  --- http_request.c1996/10/16 17:29:22 1.17
  ***
  *** 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.16 1996/10/08 20:43:31 brian Exp $ */

/*
 * http_request.c: functions to get and process requests
  --- 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.17 1996/10/16 17:29:22 ben Exp $ */

/*
 * http_request.c: functions to get and process requests
  ***
  *** 598,603 
  --- 598,604 
 */

if ((res = directory_walk (rnew))
  + || (res = location_walk (rnew))
|| (res = file_walk (rnew))
|| (!some_auth_required (rnew) ? 0 :
 ((res = check_user_id (rnew)) || (res = check_auth (rnew
  ***
  *** 641,646 
  --- 642,648 
  make_full_path (rnew->pool, fdir, new_file));

if ((res = directory_walk (rnew))
  + || (res = location_walk (rnew))
|| (res = file_walk (rnew))
|| (res = check_access (rnew))
|| (!some_auth_required (rnew) ? 0 :
  
  
  


cvs commit: apache/src http_request.c httpd.h http_protocol.c

1996-10-08 Thread Brian Behlendorf
brian   96/10/08 13:43:36

  Modified:src   http_request.c httpd.h http_protocol.c
  Log:
  Reviewed by:  Brian Behlendorf
  Submitted by: Rob Hartil <[EMAIL PROTECTED]>
  
  Rob wrote:
  > "no_cache" had been borrowed to do stuff that it shouldn't have.
  
  Revision  ChangesPath
  1.16  +5 -4  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -C3 -r1.15 -r1.16
  *** http_request.c1996/08/20 11:50:51 1.15
  --- http_request.c1996/10/08 20:43:31 1.16
  ***
  *** 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.15 1996/08/20 11:50:51 paul Exp $ */

/*
 * http_request.c: functions to get and process requests
  --- 50,56 
 *
 */

  ! /* $Id: http_request.c,v 1.16 1996/10/08 20:43:31 brian Exp $ */

/*
 * http_request.c: functions to get and process requests
  ***
  *** 713,721 
r->status = REDIRECT;
table_set (r->headers_out, "Location", custom_response);
} else if ( custom_response[0] == '/') {
  ! r->no_cache = 1;/* Do NOT send USE_LOCAL_COPY for
  !  * error documents!
  !  */
/* This redirect needs to be a GET no matter what the original
 * method was.
 */
  --- 713,721 
r->status = REDIRECT;
table_set (r->headers_out, "Location", custom_response);
} else if ( custom_response[0] == '/') {
  ! r->no_local_copy = 1; /* Do NOT send USE_LOCAL_COPY for
  !* error documents!
  !*/
/* This redirect needs to be a GET no matter what the original
 * method was.
 */
  ***
  *** 950,955 
  --- 950,956 
new->no_cache = r->no_cache; /* If we've already made up our minds
  * about this, don't change 'em back!
  */
  + new->no_local_copy = r->no_local_copy;

sprintf (t, "%d", r->status);
table_set (new->subprocess_env, "REDIRECT_STATUS", pstrdup (r->pool, 
t));
  
  
  
  1.52  +2 -1  apache/src/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apache/src/httpd.h,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -C3 -r1.51 -r1.52
  *** httpd.h   1996/09/30 05:56:26 1.51
  --- httpd.h   1996/10/08 20:43:32 1.52
  ***
  *** 50,56 
 *
 */

  ! /* $Id: httpd.h,v 1.51 1996/09/30 05:56:26 brian Exp $ */

/*
 * httpd.h: header for simple (ha! not anymore) http daemon
  --- 50,56 
 *
 */

  ! /* $Id: httpd.h,v 1.52 1996/10/08 20:43:32 brian Exp $ */

/*
 * httpd.h: header for simple (ha! not anymore) http daemon
  ***
  *** 409,414 
  --- 409,415 
  char *content_language;
  
  int no_cache;
  +   int no_local_copy;
  
  /* What object is being requested (either directly, or via include
   * or content-negotiation mapping).
  
  
  
  1.52  +3 -3  apache/src/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apache/src/http_protocol.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -C3 -r1.51 -r1.52
  *** http_protocol.c   1996/09/30 05:56:25 1.51
  --- http_protocol.c   1996/10/08 20:43:33 1.52
  ***
  *** 50,56 
 *
 */
  
  ! /* $Id: http_protocol.c,v 1.51 1996/09/30 05:56:25 brian Exp $ */

/*
 * http_protocol.c --- routines which directly communicate with the
  --- 50,56 
 *
 */
  
  ! /* $Id: http_protocol.c,v 1.52 1996/10/08 20:43:33 brian Exp $ */

/*
 * http_protocol.c --- routines which directly communicate with the
  ***
  *** 357,363 
 * not allowing conditional GETs.
 */

  ! if (r->no_cache) return OK;

/* Check for conditional GETs --- note that we only want this check
 * to succeed if the GET was successful; ErrorDocuments *always* get 
sent.
  --- 357,363 
 * not allowing conditional GETs.
 */

  ! if (r->no_local_copy) return OK;

/* Check for conditional GETs --- note that we only want this check
 * to succeed if the GET was successful; ErrorDocuments *always* get 
sent.
  ***
  *** 705,711 
void set_sub_req_protocol (request_rec *rnew, request_rec *r)
{
rnew->assbackwards = 1; /* Don't send headers from this. */
  ! rnew->no_cache = 1; /* Don't try to send USE_L

cvs commit: apache/src http_request.c

1996-08-05 Thread Brian Behlendorf
brian   96/08/05 22:24:49

  Modified:src   http_request.c
  Log:
  Reviewed by:  Brian Behlendorf
  Submitted by: Garey Smiley
  
  The following patch fixes OS/2 drive name support ia 1.1.1.
  
  Revision  ChangesPath
  1.14  +5 -0  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -C3 -r1.13 -r1.14
  *** http_request.c1996/07/28 19:27:45 1.13
  --- http_request.c1996/08/06 05:24:47 1.14
  ***
  *** 224,230 
  --- 224,235 
 * for the moment, that's not worth the trouble.
 */

  + #ifdef __EMX__
  + /* Add OS/2 drive name support */
  + if ((test_filename[0] != '/') && (test_filename[1] != ':'))
  + #else
if (test_filename[0] != '/')
  + #endif
{
/* fake filenames only match Directory sections */
void *this_conf, *entry_config;
  
  
  


cvs commit: apache/src http_request.c

1996-07-01 Thread Alexei Kosut
akosut  96/07/01 11:10:30

  Modified:src   http_request.c
  Log:
  Further fix the multi-method Limit protection problem.
  
  Submitted by: [EMAIL PROTECTED]
  Reviewed by: Alexei Kosut, Robert S. Thau
  
  Revision  ChangesPath
  1.11  +5 -2  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -C3 -r1.10 -r1.11
  *** http_request.c1996/06/17 20:28:19 1.10
  --- http_request.c1996/07/01 18:10:29 1.11
  ***
  *** 464,469 
  --- 464,472 
return rnew;
}

  + 
  + static int some_auth_required (request_rec *r);
  + 
request_rec *sub_req_lookup_uri (char *new_file, request_rec *r)
{
request_rec *rnew;
  ***
  *** 510,516 
 */

if ((res = directory_walk (rnew))
  ! || (!auth_type (rnew) ? 0 :
 ((res = check_user_id (rnew)) || (res = check_auth (rnew
|| (res = check_access (rnew))
|| (res = find_types (rnew))
  --- 513,519 
 */

if ((res = directory_walk (rnew))
  ! || (!some_auth_required (rnew) ? 0 :
 ((res = check_user_id (rnew)) || (res = check_auth (rnew
|| (res = check_access (rnew))
|| (res = find_types (rnew))
  ***
  *** 553,559 

if ((res = directory_walk (rnew))
|| (res = check_access (rnew))
  ! || (!auth_type (rnew) ? 0 :
 ((res = check_user_id (rnew)) && (res = check_auth (rnew
|| (res = find_types (rnew))
|| (res = run_fixups (rnew))
  --- 556,562 

if ((res = directory_walk (rnew))
|| (res = check_access (rnew))
  ! || (!some_auth_required (rnew) ? 0 :
 ((res = check_user_id (rnew)) && (res = check_auth (rnew
|| (res = find_types (rnew))
|| (res = run_fixups (rnew))
  
  
  


cvs commit: apache/src http_request.c

1996-06-12 Thread Brian Behlendorf
brian   96/06/12 20:09:24

  Modified:src   http_request.c
  Log:
  Reviewed by:  Brian Behlendorf
  Submitted by: Andrew Wilson
  
  Fixed compilation warning with an unused variable without STATUS 
instrumentation.
  
  Revision  ChangesPath
  1.9   +2 -0  apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -C3 -r1.8 -r1.9
  *** http_request.c1996/06/10 02:04:04 1.8
  --- http_request.c1996/06/13 03:09:22 1.9
  ***
  *** 749,755 
  --- 749,757 

void process_request (request_rec *r)
{
  + #ifdef STATUS
int old_stat;
  + #endif /* STATUS */
process_request_internal (r);
#ifdef STATUS
old_stat = update_child_status (r->connection->child_num, 
SERVER_BUSY_LOG,
  
  
  


Re: cvs commit: apache/src http_request.c

1996-04-09 Thread Alexei Kosut
On Tue, 9 Apr 1996, Alexei Kosut wrote:

>   Change the access file parsing so that  sections are parsed
>   after  sections. This lets the latter override the former,
>   which in most cases is the desired behavior.

Oops... this log is incorrect. I meant "This lets the former override
the latter" ( overriding )

--

Alexei Kosut <[EMAIL PROTECTED]>
URL: http://www.nueva.pvt.k12.ca.us/~akosut/
Lefler on IRC, DALnet 



cvs commit: apache/src http_request.c

1996-04-09 Thread Alexei Kosut
akosut  96/04/09 16:06:04

  Modified:src   http_request.c
  Log:
  Change the access file parsing so that  sections are parsed
  after  sections. This lets the latter override the former,
  which in most cases is the desired behavior.
  
  Revision  ChangesPath
  1.6   +56 -41apache/src/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -C3 -r1.5 -r1.6
  *** http_request.c1996/04/06 23:38:26 1.5
  --- http_request.c1996/04/09 23:06:03 1.6
  ***
  *** 192,247 
core_server_config *sconf = get_module_config (r->server->module_config,
   &core_module);
array_header *sec_array = copy_array (r->pool, sconf->sec);
  - array_header *url_array = copy_array (r->pool, sconf->sec_url);
void *per_dir_defaults = r->server->lookup_defaults;

core_dir_config **sec = (core_dir_config **)sec_array->elts;
int num_sec = sec_array->nelts;
char *test_filename = pstrdup (r->pool, r->filename);

  - core_dir_config **url = (core_dir_config **)url_array->elts;
  - int num_url = url_array->nelts;
  - char *test_location = pstrdup (r->pool, r->uri);
  - 
int num_dirs, res;
int i;

  - /* First, go through the location entries, and check for matches. */
  - 
  - if (num_url) {
  - void *this_conf, *entry_config;
  - core_dir_config *entry_core;
  - char *entry_url;
  - int j;
  - 
  - /* 
  -  * we apply the directive sections in some order; should really try them
  -  * with the most general first.
  -  */
  - for (j = 0; j < num_url; ++j) {
  - 
  - entry_config = url[j];
  - if (!entry_config) continue;
  - 
  - entry_core =(core_dir_config *)
  - get_module_config(entry_config, &core_module);
  - entry_url = entry_core->d;
  - 
  - this_conf = NULL;
  - if (is_matchexp(entry_url)) {
  - if (!strcmp_match(test_location, entry_url))
  - this_conf = entry_config;
  - }
  - else if (!strncmp (test_location, entry_url, strlen(entry_url)))
  - this_conf = entry_config;
  - 
  - if (this_conf)
  - per_dir_defaults = merge_per_dir_configs (r->pool,
  - per_dir_defaults, this_conf);
  - }
  - 
  - }
  - 
/* Are we dealing with a file? If not, we can (hopefuly) safely assume
 * we have a handler that doesn't require one, but for safety's sake,
 * and so we have something find_types() can get something out of,
  --- 192,206 
  ***
  *** 391,396 
  --- 350,406 
 */
}

  + int location_walk (request_rec *r)
  + {
  + core_server_config *sconf = get_module_config (r->server->module_config,
  +&core_module);
  + array_header *url_array = copy_array (r->pool, sconf->sec_url);
  + void *per_dir_defaults = r->per_dir_config;
  + 
  + core_dir_config **url = (core_dir_config **)url_array->elts;
  + int num_url = url_array->nelts;
  + char *test_location = pstrdup (r->pool, r->uri);
  + 
  + /* Go through the location entries, and check for matches. */
  + 
  + if (num_url) {
  + void *this_conf, *entry_config;
  + core_dir_config *entry_core;
  + char *entry_url;
  + int j;
  + 
  + /* 
  +  * we apply the directive sections in some order; should really try them
  +  * with the most general first.
  +  */
  + for (j = 0; j < num_url; ++j) {
  + 
  + entry_config = url[j];
  + if (!entry_config) continue;
  + 
  + entry_core =(core_dir_config *)
  + get_module_config(entry_config, &core_module);
  + entry_url = entry_core->d;
  + 
  + this_conf = NULL;
  + if (is_matchexp(entry_url)) {
  + if (!strcmp_match(test_location, entry_url))
  + this_conf = entry_config;
  + }
  + else if (!strncmp (test_location, entry_url, strlen(entry_url)))
  + this_conf = entry_config;
  + 
  + if (this_conf)
  + per_dir_defaults = merge_per_dir_configs (r->pool,
  + per_dir_defaults, this_conf);
  + }
  + 
  + r->per_dir_config = per_dir_defaults;
  + }
  + 
  + return OK;
  + }
  + 
/*
 *
 * The sub_request mechanism.
  ***
  *** 685,690 
  --- 695,705 
}

if ((access_status = directory_walk (r))) {
  + die (access_status, r);
  + return;
  + }   
  +