At the moment I store them in global. Is that the correct way ? I want the variable to stay with the current request and goes away after the request is finished.
For example:
int data1;
int data2;
apr_status_t my_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes) {
if (somecond1) data1 = xyz;
if (somecond2 & data1 == xya) data2 = abc;
if (somecond3 && data2 == abc) dosomething();
}
Note that the 3 cond may not happen in one go while filtering, they may appear at different moment, but with the same request.