On Feb 8, 2008, at 5:45 PM, Plüm, Rüdiger, VF-Group wrote:

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.

...
I guess this happens in at least one more location at mod_negotiation
that would also need fixing (in setup_choice_response).

Below are all the only two places I could find. Let me know which ones I missed !

Dw

4x4:httpd-trunk dirkx$ svn diff modules/mappers/
Index: modules/mappers/mod_dir.c
===================================================================
--- modules/mappers/mod_dir.c   (revision 618646)
+++ modules/mappers/mod_dir.c   (working copy)
 @@ -176,7 +185,8 @@
name_ptr = apr_pstrcat(r->pool, name_ptr, "?", r->args, NULL);
         }

-        rr = ap_sub_req_lookup_uri(name_ptr, r, NULL);
+/* XXXX */
+        rr = ap_sub_req_lookup_uri(name_ptr, r, r->output_filters);

/* The sub request lookup is very liberal, and the core map_to_storage * handler will almost always result in HTTP_OK as /foo/ index.html

Index: modules/mappers/mod_negotiation.c
===================================================================
--- modules/mappers/mod_negotiation.c   (revision 618646)
+++ modules/mappers/mod_negotiation.c   (working copy)
@@ -1165,8 +1165,10 @@

/* Double check, we still don't multi-resolve non-ordinary files
          */
-        if (sub_req->finfo.filetype != APR_REG)
+        if (sub_req->finfo.filetype != APR_REG) {
+           /* XXX sub req not destroyed */
             continue;
+       }

         /* If it has a handler, we'll pretend it's a CGI script,
          * since that's a good indication of the sort of thing it
@@ -3122,7 +3124,7 @@
          * a sub_req structure yet.  Get one now.
          */

-        sub_req = ap_sub_req_lookup_file(best->file_name, r, NULL);
+ sub_req = ap_sub_req_lookup_file(best->file_name, r, r- >output_filters);
         if (sub_req->status != HTTP_OK) {
             res = sub_req->status;
             ap_destroy_sub_req(sub_req);

Reply via email to