]> granicus.if.org Git - apache/commitdiff
Use ap_document_root() in ap_core_translate() to allow modules like
authorStefan Fritsch <sf@apache.org>
Wed, 27 Jul 2011 07:23:35 +0000 (07:23 +0000)
committerStefan Fritsch <sf@apache.org>
Wed, 27 Jul 2011 07:23:35 +0000 (07:23 +0000)
mod_vhost_ldap let core do the name translation

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

server/core.c

index c2b646408a9caf1fc558bea1c830a6da2dd18e3d..b5a028029dfce510e187b8df2e1f42ac9ad9d77c 100644 (file)
@@ -3915,8 +3915,6 @@ AP_INIT_TAKE1("TraceEnable", set_trace_enable, NULL, RSRC_CONF,
 
 AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r)
 {
-    void *sconf = r->server->module_config;
-    core_server_config *conf = ap_get_core_module_config(sconf);
     apr_status_t rv;
 
     /* XXX this seems too specific, this should probably become
@@ -3944,7 +3942,7 @@ AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r)
         while (*path == '/') {
             ++path;
         }
-        if ((rv = apr_filepath_merge(&r->filename, conf->ap_document_root, path,
+        if ((rv = apr_filepath_merge(&r->filename, ap_document_root(r), path,
                                      APR_FILEPATH_TRUENAME
                                    | APR_FILEPATH_SECUREROOT, r->pool))
                     != APR_SUCCESS) {
@@ -3967,7 +3965,7 @@ AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r)
         while (*path == '/') {
             ++path;
         }
-        if ((rv = apr_filepath_merge(&r->filename, conf->ap_document_root, path,
+        if ((rv = apr_filepath_merge(&r->filename, ap_document_root(r), path,
                                      APR_FILEPATH_TRUENAME
                                    | APR_FILEPATH_SECUREROOT, r->pool))
                     != APR_SUCCESS) {