Dirk-Willem van Gulik wrote:
In a number of places we are usingL
... = ap_sub_req_lookup_uri(..., r, NULL);
... = ap_sub_req_lookup_file(..., r, NULL);
... = ap_sub_req_lookup_dirent...., NULL);
... = ap_sub_req_lookup_uri( ... ,NULL);
Where null is the output filter to preserve, if any (at NULL
proto_output_filter is used).
We do this to see what a sub request would look like; and then later on
we clean it up; perhaps after capturing some result, modified path,
filling out some SSI etc (e.g. mod_include, mod_isapi, mod_auto_index,
mod_cgid, mod_cern, mod_mime_magic or mod_rewrite). And then we discart
the sub request and continue with the real request.
However we also occasionally do NOT do this - but make the thus created
sub request as the main request i.e. some redirect where we do not
discard the sub_req -- but continue to operate on it (e.g. the core of
mod_dir, mod_negotiation) - and pass it to a internal(fast)redirect.
Am I right to understand that this is not correct ?
I agree it looks like a flaw... apply your proposed fix to trunk, and let's
slowly move on backporting to 2.2 to ensure no evil side-effects?
Bill