Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 71010 invoked from network); 8 Feb 2008 22:35:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2008 22:35:25 -0000 Received: (qmail 43882 invoked by uid 500); 8 Feb 2008 22:35:13 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 43724 invoked by uid 500); 8 Feb 2008 22:35:12 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 43713 invoked by uid 99); 8 Feb 2008 22:35:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2008 14:35:12 -0800 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=FB_WORD1_END_DOLLAR,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dirkx@webweaving.org designates 209.132.96.45 as permitted sender) Received: from [209.132.96.45] (HELO skutsje.san.webweaving.org) (209.132.96.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2008 22:34:41 +0000 Received: from [10.11.0.121] (5356CA0A.cable.casema.nl [83.86.202.10]) (authenticated bits=0) by skutsje.san.webweaving.org (8.12.9/8.12.9) with ESMTP id m18MYh2R033196 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 8 Feb 2008 14:34:47 -0800 (PST) (envelope-from dirkx@webweaving.org) Message-Id: <54D6F4D6-1E26-4931-9E0B-BEC9EB903D96@webweaving.org> From: Dirk-Willem van Gulik To: dev@httpd.apache.org In-Reply-To: <99EA83DCDE961346AFA9B5EC33FEC08B46461D@VF-MBX11.internal.vodafone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: ap_sub_req_lookup_* loosing filter context Date: Fri, 8 Feb 2008 23:34:46 +0100 References: <335D1A4B-25E2-4FF1-8CDF-5010A7FBD293@webweaving.org> <99EA83DCDE961346AFA9B5EC33FEC08B46461D@VF-MBX11.internal.vodafone.com> X-Mailer: Apple Mail (2.915) X-Virus-Checked: Checked by ClamAV on apache.org On Feb 8, 2008, at 5:45 PM, Pl=FCm, R=FCdiger, 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 =20= I missed ! Dw 4x4:httpd-trunk dirkx$ svn diff modules/mappers/ Index: modules/mappers/mod_dir.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/mappers/mod_dir.c (revision 618646) +++ modules/mappers/mod_dir.c (working copy) @@ -176,7 +185,8 @@ name_ptr =3D apr_pstrcat(r->pool, name_ptr, "?", r->args, =20= NULL); } - rr =3D ap_sub_req_lookup_uri(name_ptr, r, NULL); +/* XXXX */ + rr =3D ap_sub_req_lookup_uri(name_ptr, r, r->output_filters); /* The sub request lookup is very liberal, and the core =20 map_to_storage * handler will almost always result in HTTP_OK as /foo/=20 index.html Index: modules/mappers/mod_negotiation.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 =20 files */ - if (sub_req->finfo.filetype !=3D APR_REG) + if (sub_req->finfo.filetype !=3D 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 =3D ap_sub_req_lookup_file(best->file_name, r, NULL); + sub_req =3D ap_sub_req_lookup_file(best->file_name, r, r-=20 >output_filters); if (sub_req->status !=3D HTTP_OK) { res =3D sub_req->status; ap_destroy_sub_req(sub_req);