From: William A. Rowe Jr Date: Wed, 27 Jun 2001 20:57:14 +0000 (+0000) Subject: Here, finally are a few cleanups of my fat fingers. X-Git-Tag: 2.0.19~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7a28bd8c066a85ccac5719d1ad613507c093c88;p=thirdparty%2Fapache%2Fhttpd.git Here, finally are a few cleanups of my fat fingers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89444 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/http_request.h b/include/http_request.h index 03fc6eb2854..0b5cea22d4f 100644 --- a/include/http_request.h +++ b/include/http_request.h @@ -132,7 +132,7 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file, * The file info passed must include the name, and must have the same relative * directory as the current request. */ -AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(apr_finfo_t *finfo, +AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(const apr_finfo_t *finfo, const request_rec *r, ap_filter_t *next_filter); /** diff --git a/server/request.c b/server/request.c index c520f89d83d..ce08d9d14e3 100644 --- a/server/request.c +++ b/server/request.c @@ -954,10 +954,11 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_file, return ap_sub_req_method_uri("GET", new_file, r, next_filter); } -AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(apr_finfo_t *dirent, +AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(const apr_finfo_t *dirent, const request_rec *r, ap_filter_t *next_filter) { + apr_status_t rv; request_rec *rnew; int res; char *fdir; @@ -982,13 +983,12 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(apr_finfo_t *dirent, */ udir = ap_make_dirstr_parent(rnew->pool, r->uri); - apr_status_t rv; rnew->uri = ap_make_full_path(rnew->pool, udir, dirent->name); rnew->filename = ap_make_full_path(rnew->pool, fdir, dirent->name); ap_parse_uri(rnew, rnew->uri); /* fill in parsed_uri values */ - if ((dirent->finfo & APR_FINFO_MIN) != APR_FINFO_MIN) { + if ((dirent->valid & APR_FINFO_MIN) != APR_FINFO_MIN) { if (((rv = apr_stat(&rnew->finfo, rnew->filename, APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS) && (rv != APR_INCOMPLETE)) { @@ -996,8 +996,7 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(apr_finfo_t *dirent, } } else { - r->finfo = apr_palloc(rnew->pool, sizeof(apr_finfo_t)); - memcpy (r->finfo, dirent); + memcpy (&rnew->finfo, dirent, sizeof(apr_finfo_t)); } if ((res = check_safe_file(rnew))) {