Commit 53d1b1ad authored by Graham Leggett's avatar Graham Leggett
Browse files

mod_rewrite: Decline immediately if the rewrite engine is disabled, instead

of making various comparatively expensive proxy checks first.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1081197 13f79535-47bb-0310-9956-ffa450edef68
parent 2c2c05ae
Loading
Loading
Loading
Loading
+8 −8
Changes for modules/mappers/mod_rewrite.c: 8 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -4680,6 +4680,14 @@ static int hook_fixup(request_rec *r)
        return DECLINED;
    }

    /*
     * only do something under runtime if the engine is really enabled,
     * for this directory, else return immediately!
     */
    if (dconf->state == ENGINE_DISABLED) {
        return DECLINED;
    }

    /* if there are no real (i.e. no RewriteRule directives!)
       per-dir config of us, we return also immediately */
    if (dconf->directory == NULL) {
@@ -4706,14 +4714,6 @@ static int hook_fixup(request_rec *r)
        }
    }

    /*
     *  only do something under runtime if the engine is really enabled,
     *  for this directory, else return immediately!
     */
    if (!dconf || dconf->state == ENGINE_DISABLED) {
        return DECLINED;
    }

    /* END flag was used as a RewriteRule flag on this request */ 
    apr_pool_userdata_get(&skipdata, really_last_key, r->pool);
    if (skipdata != NULL) {