From: William A. Rowe Jr Date: Wed, 31 Jan 2001 23:11:05 +0000 (+0000) Subject: Fix the remaining APR_FINFO_NORM occurances. Again, followup is needed X-Git-Tag: APACHE_2_0_BETA_CANDIDATE_1~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d038b40a6fa3befc31d6281e7b57a73adadc3746;p=apache Fix the remaining APR_FINFO_NORM occurances. Again, followup is needed to actually test any field outside the scope of APR_FINFO_MIN. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87935 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_request.c b/modules/http/http_request.c index 3c4bc08bf3..178afb04bd 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -978,7 +978,7 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file, ap_parse_uri(rnew, rnew->uri); /* fill in parsed_uri values */ if (((rv = apr_stat(&rnew->finfo, rnew->filename, - APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS) + APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS) && (rv != APR_INCOMPLETE)) { rnew->finfo.filetype = 0; } diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 0212153e5b..d7408351aa 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -491,7 +491,7 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1, newmap->fpout = NULL; if (newmap->checkfile && (sconf->state == ENGINE_ENABLED) - && (apr_stat(&st, newmap->checkfile, APR_FINFO_NORM, + && (apr_stat(&st, newmap->checkfile, APR_FINFO_MIN, cmd->pool) != APR_SUCCESS)) { return apr_pstrcat(cmd->pool, "RewriteMap: map file or program not found:", @@ -2114,14 +2114,14 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, rc = 0; if (strcmp(p->pattern, "-f") == 0) { - if (apr_stat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) { + if (apr_stat(&sb, input, APR_FINFO_MIN, r->pool) == APR_SUCCESS) { if (sb.filetype == APR_REG) { rc = 1; } } } else if (strcmp(p->pattern, "-s") == 0) { - if (apr_stat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) { + if (apr_stat(&sb, input, APR_FINFO_MIN, r->pool) == APR_SUCCESS) { if ((sb.filetype == APR_REG) && sb.size > 0) { rc = 1; } @@ -2129,7 +2129,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, } else if (strcmp(p->pattern, "-l") == 0) { #if !defined(OS2) - if (apr_lstat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) { + if (apr_lstat(&sb, input, APR_FINFO_MIN, r->pool) == APR_SUCCESS) { if (sb.filetype == APR_LNK) { rc = 1; } @@ -2137,7 +2137,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, #endif } else if (strcmp(p->pattern, "-d") == 0) { - if (apr_stat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) { + if (apr_stat(&sb, input, APR_FINFO_MIN, r->pool) == APR_SUCCESS) { if (sb.filetype == APR_DIR) { rc = 1; } @@ -2174,7 +2174,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, /* file exists for any result up to 2xx, no redirects */ if (rsub->status < 300 && /* double-check that file exists since default result is 200 */ - apr_stat(&sb, rsub->filename, APR_FINFO_NORM, + apr_stat(&sb, rsub->filename, APR_FINFO_MIN, r->pool) == APR_SUCCESS) { rc = 1; } @@ -2658,7 +2658,7 @@ static char *lookup_map(request_rec *r, char *name, char *key) if (strcmp(s->name, name) == 0) { if (s->type == MAPTYPE_TXT) { if ((rv = apr_stat(&st, s->checkfile, - APR_FINFO_NORM, r->pool)) != APR_SUCCESS) { + APR_FINFO_MIN, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mod_rewrite: can't access text RewriteMap " "file %s", s->checkfile); @@ -2696,7 +2696,7 @@ static char *lookup_map(request_rec *r, char *name, char *key) else if (s->type == MAPTYPE_DBM) { #ifndef NO_DBM_REWRITEMAP if ((rv = apr_stat(&st, s->checkfile, - APR_FINFO_NORM, r->pool)) != APR_SUCCESS) { + APR_FINFO_MIN, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mod_rewrite: can't access DBM RewriteMap " "file %s", s->checkfile); @@ -2759,7 +2759,7 @@ static char *lookup_map(request_rec *r, char *name, char *key) } else if (s->type == MAPTYPE_RND) { if ((rv = apr_stat(&st, s->checkfile, - APR_FINFO_NORM, r->pool)) != APR_SUCCESS) { + APR_FINFO_MIN, r->pool)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mod_rewrite: can't access text RewriteMap " "file %s", s->checkfile); @@ -4005,7 +4005,7 @@ static int prefix_stat(const char *path, apr_finfo_t *sb) if ((cp = strchr(curpath+1, '/')) != NULL) { *cp = '\0'; } - if (apr_stat(sb, curpath, APR_FINFO_NORM, NULL) == APR_SUCCESS) { + if (apr_stat(sb, curpath, APR_FINFO_MIN, NULL) == APR_SUCCESS) { return 1; } else { diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c index f093c99573..37a2c0ba60 100644 --- a/modules/mappers/mod_userdir.c +++ b/modules/mappers/mod_userdir.c @@ -340,7 +340,7 @@ static int translate_userdir(request_rec *r) * used, for example, to run a CGI script for the user. */ if (filename && (!*userdirs - || ((rv = apr_stat(&statbuf, filename, APR_FINFO_NORM, + || ((rv = apr_stat(&statbuf, filename, APR_FINFO_MIN, r->pool)) == APR_SUCCESS || rv == APR_INCOMPLETE))) { r->filename = apr_pstrcat(r->pool, filename, dname, NULL); diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 8060f62fb4..ed858b98e9 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1271,7 +1271,7 @@ int ap_proxy_cache_send(request_rec *r, ap_cache_el *c) len = 2; apr_send(fp, CRLF, &len); /* send data */ - apr_getfileinfo(&finfo, APR_FINFO_NORM, cachefp); + apr_getfileinfo(&finfo, APR_FINFO_MIN, cachefp); if(!r->header_only && ap_send_fd(cachefp, r, offset, finfo.size, &len)) return HTTP_INTERNAL_SERVER_ERROR; return OK;