| 1198 | } |
| 1199 | |
| 1200 | static void hc_show_exprs(request_rec *r) |
| 1201 | { |
| 1202 | const apr_table_entry_t *elts; |
| 1203 | const apr_array_header_t *hdr; |
| 1204 | int i; |
| 1205 | sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config, |
| 1206 | &proxy_hcheck_module); |
| 1207 | if (!ctx) |
| 1208 | return; |
| 1209 | if (apr_is_empty_table(ctx->conditions)) |
| 1210 | return; |
| 1211 | |
| 1212 | ap_rputs("\n\n<table>" |
| 1213 | "<tr><th colspan='2'>Health check cond. expressions:</th></tr>\n" |
| 1214 | "<tr><th>Expr name</th><th>Expression</th></tr>\n", r); |
| 1215 | |
| 1216 | hdr = apr_table_elts(ctx->conditions); |
| 1217 | elts = (const apr_table_entry_t *) hdr->elts; |
| 1218 | for (i = 0; i < hdr->nelts; ++i) { |
| 1219 | hc_condition_t *cond; |
| 1220 | if (!elts[i].key) { |
| 1221 | continue; |
| 1222 | } |
| 1223 | cond = (hc_condition_t *)elts[i].val; |
| 1224 | ap_rprintf(r, "<tr><td>%s</td><td>%s</td></tr>\n", |
| 1225 | ap_escape_html(r->pool, elts[i].key), |
| 1226 | ap_escape_html(r->pool, cond->expr)); |
| 1227 | } |
| 1228 | ap_rputs("</table><hr/>\n", r); |
| 1229 | } |
| 1230 | |
| 1231 | static void hc_select_exprs(request_rec *r, const char *expr) |
| 1232 | { |
nothing calls this directly
no test coverage detected