summaryrefslogtreecommitdiff
path: root/src/mod_rewrite.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-11-20 03:29:38 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2021-11-20 03:33:16 -0500
commit6d47d4c69997c3f62e35d71203d770a4a98dcb56 (patch)
tree78c32d5bb94ce6cf10d33691d79063daa30caa0b /src/mod_rewrite.c
parent3b3574c5e6d57aeeebe87706bb861762d1a3826f (diff)
downloadlighttpd-git-6d47d4c69997c3f62e35d71203d770a4a98dcb56.tar.gz
[core] use stack w/ pcre_exec unless save captures
use stack w/ pcre_exec unless saving captures from config conditions reduce memory allocations per request where lighttpd.conf does not contain url.redirect or url.rewrite rules where replacements reference a match of the enclosing lighttpd.conf condition (e.g. %0, %1, %2 ...) move cond_cache_t 'patterncount' to cond_match_t 'captures' While cond_match_t is no longer sized power-2, it is generally expected to be used much less frequently than before (which was all the time), since it is now used only with url.redirect or url.rewrite with references %0, %1, %2, ...
Diffstat (limited to 'src/mod_rewrite.c')
-rw-r--r--src/mod_rewrite.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/mod_rewrite.c b/src/mod_rewrite.c
index a547f0bd..352d8860 100644
--- a/src/mod_rewrite.c
+++ b/src/mod_rewrite.c
@@ -291,8 +291,6 @@ static handler_t process_rewrite_rules(request_st * const r, plugin_data *p, con
ctx.cache = NULL;
if (kvb->x0) { /*(kvb->x0 is capture_idx)*/
- ctx.cond_match_count =
- r->cond_cache[kvb->cfgidx].patterncount;
ctx.cache = r->cond_match[kvb->x0];
}
ctx.burl = &burl;