MCPcopy Create free account
hub / github.com/apache/httpd / ap_expr_exec_re

Function ap_expr_exec_re

server/util_expr_eval.c:881–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

879}
880
881AP_DECLARE(int) ap_expr_exec_re(request_rec *r, const ap_expr_info_t *info,
882 apr_size_t nmatch, ap_regmatch_t *pmatch,
883 const char **source, const char **err)
884{
885 ap_expr_eval_ctx_t ctx;
886 int dont_vary = (info->flags & AP_EXPR_FLAG_DONT_VARY);
887 const char *tmp_source = NULL, *vary_this = NULL;
888 ap_regmatch_t tmp_pmatch[AP_MAX_REG_MATCH];
889
890 AP_DEBUG_ASSERT((info->flags & AP_EXPR_FLAG_STRING_RESULT) == 0);
891
892 ctx.r = r;
893 ctx.c = r->connection;
894 ctx.s = r->server;
895 ctx.p = r->pool;
896 ctx.err = err;
897 ctx.info = info;
898 ctx.re_nmatch = nmatch;
899 ctx.re_pmatch = pmatch;
900 ctx.re_source = source;
901 ctx.vary_this = dont_vary ? NULL : &vary_this;
902 ctx.data = NULL;
903
904 if (!pmatch) {
905 ctx.re_nmatch = AP_MAX_REG_MATCH;
906 ctx.re_pmatch = tmp_pmatch;
907 ctx.re_source = &tmp_source;
908 }
909
910 return ap_expr_exec_ctx(&ctx);
911}
912
913AP_DECLARE(const char *) ap_expr_str_exec_re(request_rec *r,
914 const ap_expr_info_t *info,

Callers 4

fix_cgivarsFunction · 0.85
apply_rewrite_condFunction · 0.85
match_headersFunction · 0.85
ap_expr_execFunction · 0.85

Calls 1

ap_expr_exec_ctxFunction · 0.85

Tested by

no test coverage detected