Hack, hack, hack...! TODO: Make this actually work properly */
| 2655 | |
| 2656 | /* Hack, hack, hack...! TODO: Make this actually work properly */ |
| 2657 | static int lua_ap_get_active_config(lua_State *L) { |
| 2658 | ap_directive_t *subdir; |
| 2659 | ap_directive_t *dir = ap_conftree; |
| 2660 | request_rec *r = ap_lua_check_request_rec(L, 1); |
| 2661 | |
| 2662 | for (dir = ap_conftree; dir; dir = dir->next) { |
| 2663 | if (ap_strcasestr(dir->directive, "<virtualhost") && dir->first_child) { |
| 2664 | for (subdir = dir->first_child; subdir; subdir = subdir->next) { |
| 2665 | if (ap_strcasecmp_match(subdir->directive, "servername") && |
| 2666 | !ap_strcasecmp_match(r->hostname, subdir->args)) { |
| 2667 | read_cfg_tree(L, r, dir->first_child); |
| 2668 | return 1; |
| 2669 | } |
| 2670 | if (ap_strcasecmp_match(subdir->directive, "serveralias") && |
| 2671 | !ap_strcasecmp_match(r->hostname, subdir->args)) { |
| 2672 | read_cfg_tree(L, r, dir->first_child); |
| 2673 | return 1; |
| 2674 | } |
| 2675 | } |
| 2676 | } |
| 2677 | } |
| 2678 | return 0; |
| 2679 | } |
| 2680 | |
| 2681 | |
| 2682 |
nothing calls this directly
no test coverage detected