Skip to content

Commit 0a2d6ad

Browse files
committed
fix(apache2): reuse prev ctx instead of declining, this ensure filter is correctly executed
1 parent 06f13e9 commit 0a2d6ad

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/mod_redirectionio.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,14 @@ static int redirectionio_match_handler(request_rec *r) {
8585
return DECLINED;
8686
}
8787

88-
// Do not match against internal redirect
88+
// reuse context from prev requests in case of internal redirects, to keep the same redirectionio request and response
8989
if (r->prev) {
90+
redirectionio_context *ctx = ap_get_module_config(r->prev->request_config, &redirectionio_module);
91+
92+
if (ctx != NULL) {
93+
ap_set_module_config(r->request_config, &redirectionio_module, ctx);
94+
}
95+
9096
return DECLINED;
9197
}
9298

0 commit comments

Comments
 (0)