summaryrefslogtreecommitdiff
path: root/src/request.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-11-19 15:50:02 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2021-11-19 20:48:05 -0500
commit7ea2d407344046c81e5c6410f8a4f447efe8fdfc (patch)
treefd89e0da3fa989b57cb4f78defe8e6b13284f52d /src/request.h
parent04d387e37fc97a6e3176d3e03a98585fbd341793 (diff)
downloadlighttpd-git-7ea2d407344046c81e5c6410f8a4f447efe8fdfc.tar.gz
[core] save config regex captures only if used
save config regex captures separately only if used by url.redirect or url.rewrite replacement directives within the condition (or for conditions containing directives from any other module which calls config_capture() for its directives during init) keep pointer to match data (cond_match_t *) in r->cond_match[] rather than cond_match_t to reduce data copying in h2_init_stream(). h2_init_stream() copies the results for already-evaluated conditions to avoid re-evaluating connection-level conditions for each and every stream. When conditions are reset, then the pointer in r->cond_match[] is updated when the condition is re-evaluated. (This all assumes that HTTP/2 connection-level conditions are not unset or re-evaluated once HTTP/2 streams begin.)
Diffstat (limited to 'src/request.h')
-rw-r--r--src/request.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/request.h b/src/request.h
index e3a987de..6a0525b5 100644
--- a/src/request.h
+++ b/src/request.h
@@ -138,7 +138,8 @@ struct request_st {
/* config conditions (internal) */
uint32_t conditional_is_valid;
struct cond_cache_t *cond_cache;
- struct cond_match_t *cond_match;
+ struct cond_match_t **cond_match;
+ struct cond_match_t *cond_match_data;
request_config conf;