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 config.c
Date Tue, 14 Jan 2003 16:56:16 GMT
wrowe       2003/01/14 08:56:16

  Modified:    server   config.c
  Log:
    ap_server_root_relative never guarenteed that the resource exists, or
    isn't a file pattern.  Correct the code to accept these cases (applied
    to both 2.0 and 2.1.)
  
  Revision  Changes    Path
  1.160     +10 -4     httpd-2.0/server/config.c
  
  Index: config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/config.c,v
  retrieving revision 1.159
  retrieving revision 1.160
  diff -u -r1.159 -r1.160
  --- config.c	14 Jan 2003 03:01:52 -0000	1.159
  +++ config.c	14 Jan 2003 16:56:16 -0000	1.160
  @@ -1276,12 +1276,18 @@
   
   AP_DECLARE(char *) ap_server_root_relative(apr_pool_t *p, const char *file)
   {
  -    char *newpath;
  -    if (apr_filepath_merge(&newpath, ap_server_root, file,
  -                           APR_FILEPATH_TRUENAME, p) == APR_SUCCESS)
  +    char *newpath = NULL;
  +    apr_status_t rv;
  +    rv = apr_filepath_merge(&newpath, ap_server_root, file,
  +                            APR_FILEPATH_TRUENAME, p);
  +    if (newpath && (rv == APR_SUCCESS || APR_STATUS_IS_EPATHWILD(rv) 
  +                                      || APR_STATUS_IS_ENOENT(rv)
  +                                      || APR_STATUS_IS_ENOTDIR(rv)) {
           return newpath;
  -    else
  +    }
  +    else {
           return NULL;
  +    }
   }
   
   AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive)
  
  
  

Mime
View raw message