Commit c12208ea authored by Cliff Woolley's avatar Cliff Woolley
Browse files

Thanks Ryan for cleaning up after my laziness. :) Here are just a few

last little changes.  ->datafile should be initialized... but doing so
brings up the fact that the check in run_rewritemap_programs() was
expecting ->datafile to have a string attached to it.  For clarity,
let's just use argv[0] there.  And since we've reinstated the use of
->checkfile, we no longer need that extra apr_stat() I hacked in,
so let's get rid of it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95375 13f79535-47bb-0310-9956-ffa450edef68
parent 17ea90f8
Loading
Loading
Loading
Loading
+4 −5
Changes for modules/mappers/mod_rewrite.c: 4 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -456,6 +456,7 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1,
    else if (strncmp(a2, "prg:", 4) == 0) {
        newmap->type      = MAPTYPE_PRG;
        apr_tokenize_to_argv(a2 + 4, &newmap->argv, cmd->pool);
        newmap->datafile  = NULL;
        newmap->checkfile = newmap->argv[0];

    }
@@ -3397,8 +3398,8 @@ static apr_status_t run_rewritemap_programs(server_rec *s, apr_pool_t *p)
        if (map->type != MAPTYPE_PRG) {
            continue;
        }
        if (map->datafile == NULL
            || *(map->datafile) == '\0'
        if (map->argv[0] == NULL
            || *(map->argv[0]) == '\0'
            || map->fpin  != NULL
            || map->fpout != NULL        ) {
            continue;
@@ -3429,10 +3430,8 @@ static apr_status_t rewritemap_program_child(apr_pool_t *p,
    apr_status_t rc;
    apr_procattr_t *procattr;
    apr_proc_t *procnew;
    apr_finfo_t st;

    if (((rc = apr_stat(&st, argv[0], APR_FINFO_MIN, p)) != APR_SUCCESS) ||
        ((rc = apr_procattr_create(&procattr, p)) != APR_SUCCESS) ||
    if (((rc = apr_procattr_create(&procattr, p)) != APR_SUCCESS) ||
        ((rc = apr_procattr_io_set(procattr, APR_FULL_BLOCK,
                                  APR_FULL_NONBLOCK,
                                  APR_FULL_NONBLOCK)) != APR_SUCCESS) ||