Martin,

  where the path is altogether invalid, ap_server_root_relative() may return
NULL (there was no better method for reporting an error.)  One can assume
the only possible error if NULL was APR_EBADPATH.  Of course, within
ap_server_root_relative() we already invoke apr_filepath_merge() so that
path+{empty} merge to test for a valid path is no longer required in this code.

  Would you please account for this possibility in your patch?

Bill

At 07:53 AM 6/20/2003, you wrote:
>martin      2003/06/20 05:53:53
>
>  Modified:    server   core.c
>  Log:
>  DocumentRoot always used to be interpreted relative to ServerRoot. Make it 
> server_root_relative like in Apache-1.3
>  
>  Revision  Changes    Path
>  1.239     +3 -1      httpd-2.0/server/core.c
>  
>  Index: core.c
>  ===================================================================
>  RCS file: /home/cvs/httpd-2.0/server/core.c,v
>  retrieving revision 1.238
>  retrieving revision 1.239
>  diff -u -u -r1.238 -r1.239
>  --- core.c    11 Jun 2003 17:46:25 -0000      1.238
>  +++ core.c    20 Jun 2003 12:53:52 -0000      1.239
>  @@ -1113,8 +1113,10 @@
>           return err;
>       }
>   
>  +    /* Make it absolute, relative to ServerRoot */
>  +    arg = ap_server_root_relative(cmd->pool, arg);
>  +
>       /* TODO: ap_configtestonly && ap_docrootcheck && */
>  -    /* XXX Shouldn't this be relative to ServerRoot ??? */
>       if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,
>                              APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS
>           || !ap_is_directory(cmd->pool, arg)) {
>  
>  
>  

Reply via email to