]> granicus.if.org Git - apache/commitdiff
Fix a segfault (was getting triggered by mod_include at least) caused
authorCliff Woolley <jwoolley@apache.org>
Tue, 7 Aug 2001 02:34:42 +0000 (02:34 +0000)
committerCliff Woolley <jwoolley@apache.org>
Tue, 7 Aug 2001 02:34:42 +0000 (02:34 +0000)
by calling ap_allow_options() before setting rnew->per_dir_config.

This is the "easy looking" fix but might have side effects of which I'm
unaware... please double-check this change for correctness.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89978 13f79535-47bb-0310-9956-ffa450edef68

server/request.c

index 31b7969d8e3367dc98c422ecdd8a351af23d3a78..fee0eff300f4c8eba4a8014f12696661e7391575 100644 (file)
@@ -1510,6 +1510,8 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file,
         rnew->filename = ap_make_full_path(rnew->pool, fdir, new_file);
         ap_parse_uri(rnew, rnew->uri);    /* fill in parsed_uri values */
 
+        rnew->per_dir_config = r->per_dir_config;
+
         /*
          * If this is an APR_LNK that resolves to an APR_DIR, then 
          * we will rerun everything anyways... this should be safe.
@@ -1531,8 +1533,6 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file,
             return rnew;
         }
 
-        rnew->per_dir_config = r->per_dir_config;
-
         if (rnew->finfo.filetype == APR_LNK
             && (res = resolve_symlink(rnew->filename, &rnew->finfo, 
                                       ap_allow_options(rnew), rnew->pool)) != OK) {