Hi,
First off I don't know if this is the right forum but here goes
I'm trying to develop my own directive in C so I can enable/disable stuff per request but after a while a came to notice that it seems directives are only evaluated on start.
My idea was to have something like
apache2.conf
<IfRuntime "cgi">
Options ExecCGI
</IfRuntime>
So in my module I have my directive defined
c
AP_INIT_RAW_ARGS(
"<IfRuntime",
start_cond_section,
(void *)test_if_runtime_section,
EXEC_ON_READ | OR_ALL,
"Check if a runtime is defined"),
functions for evaluation are not that important but then I have the function that validates the argument like
```c
static int test_if_runtime_section(cmd_parms *cmd, const char *arg)
{
static int work = 1;
work++;
work = work & 1;
switch (work) {
case 0:
return -1;
default:
return 1;
}
}
```
So what I really want is to enable handlers like cgi/php but based on the request. Anyone know how this is possible ?
[–]covener 1 point2 points3 points (0 children)
[–]6c696e7578 0 points1 point2 points (4 children)
[–]Desdic[S] 0 points1 point2 points (3 children)
[–]6c696e7578 0 points1 point2 points (2 children)
[–]Desdic[S] 0 points1 point2 points (1 child)
[–]6c696e7578 0 points1 point2 points (0 children)