httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server request.c
Date Mon, 06 Aug 2001 05:26:37 GMT
wrowe       01/08/05 22:26:37

  Modified:    server   request.c
  Log:
    This was entirely broken.  We cannot skip the location walk just because
    we are in a file subrequest (think of a file server-status sitting in
    the document root, this shouldn't be blindly served as a 'file'.)
  
  Revision  Changes    Path
  1.21      +20 -24    httpd-2.0/server/request.c
  
  Index: request.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/request.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- request.c	2001/08/06 05:07:34	1.20
  +++ request.c	2001/08/06 05:26:37	1.21
  @@ -1442,23 +1442,21 @@
        * directory_walk
        */
       if (rnew->finfo.filetype == APR_DIR) {
  -        res = directory_walk(rnew);
  -        if (!res) {
  -            res = file_walk(rnew);
  -        }
  +        if (!(res = directory_walk(rnew)))
  +            if (!(res = file_walk(rnew)))
  +                res = location_walk(rnew);
       }
       else if (rnew->finfo.filetype == APR_REG || !rnew->finfo.filetype) {
           /*
            * do a file_walk, if it doesn't change the per_dir_config then
            * we know that we don't have to redo all the access checks
            */
  -        if ((res = file_walk(rnew))) {
  -            rnew->status = res;
  -            return rnew;
  -        }
  -        if (rnew->per_dir_config == r->per_dir_config) {
  -            if ((res = ap_run_type_checker(rnew)) 
  -                    || (res = ap_run_fixups(rnew))) {
  +        if (   !(res = file_walk(rnew))
  +            && !(res = location_walk(rnew))
  +            && (rnew->per_dir_config == r->per_dir_config))
  +        {
  +            if (   (res = ap_run_type_checker(rnew)) 
  +                || (res = ap_run_fixups(rnew))) {
                   rnew->status = res;
               }
               return rnew;
  @@ -1549,27 +1547,25 @@
            * directory_walk
            */
           if (rnew->finfo.filetype == APR_DIR) {
  -            res = directory_walk(rnew);
  -            if (!res) {
  -                res = file_walk(rnew);
  -            }
  +            if (!(res = directory_walk(rnew)))
  +                if (!(res = file_walk(rnew)))
  +                    res = location_walk(rnew);
           }
           else if (rnew->finfo.filetype == APR_REG || !rnew->finfo.filetype) {
               /*
                * do a file_walk, if it doesn't change the per_dir_config then
                * we know that we don't have to redo all the access checks
                */
  -        if ((res = file_walk(rnew))) {
  -            rnew->status = res;
  -            return rnew;
  -        }
  -        if (rnew->per_dir_config == r->per_dir_config) {
  -            if ((res = ap_run_type_checker(rnew)) 
  +            if (   !(res = file_walk(rnew))
  +                && !(res = location_walk(rnew))
  +                && (rnew->per_dir_config == r->per_dir_config))
  +            {
  +                if (   (res = ap_run_type_checker(rnew)) 
                       || (res = ap_run_fixups(rnew))) {
  -                rnew->status = res;
  +                    rnew->status = res;
  +                }
  +                return rnew;
               }
  -            return rnew;
  -        }  
           }
           else {
               ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, rnew,
  
  
  

Mime
View raw message