Commit ef36765c authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  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
parent a9769903
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -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 {
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1

File changed.

Contains only whitespace changes.