You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2011/03/13 20:05:40 UTC
svn commit: r1081197 - /httpd/httpd/trunk/modules/mappers/mod_rewrite.c
Author: minfrin
Date: Sun Mar 13 19:05:39 2011
New Revision: 1081197
URL: http://svn.apache.org/viewvc?rev=1081197&view=rev
Log:
mod_rewrite: Decline immediately if the rewrite engine is disabled, instead
of making various comparatively expensive proxy checks first.
Modified:
httpd/httpd/trunk/modules/mappers/mod_rewrite.c
Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1081197&r1=1081196&r2=1081197&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Sun Mar 13 19:05:39 2011
@@ -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) {