Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 30197 invoked by uid 500); 18 May 2001 13:39:31 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 29640 invoked from network); 18 May 2001 13:39:23 -0000 Message-ID: <00ed01c0dfa0$db3e0490$bd431b09@sashimi> From: "Bill Stoddard" To: References: <00d101c0df93$2dd76010$bd431b09@sashimi> Subject: Re: Allowing modules to add input filters is broken Date: Fri, 18 May 2001 09:45:52 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I am getting a bit more insite into this problem. If you want to add input filters, you need to do it with the pre_connection hook, not the insert_filters hook. The insert_filters hook is really only useful for output filters. This sould be a nice bit of info do document somewhere... Bill ----- Original Message ----- From: "Bill Stoddard" To: Sent: Friday, May 18, 2001 8:07 AM Subject: Allowing modules to add input filters is broken > To the best of my knowledge, there is no way for a module to add input > filters -- in time for them to be used during input processing --. Sure a > module can call add_input_filter, but the ap_run_insert_filter hook is run > too late for input filters to have any effect. > > There are several different ways to fix this.... > > 1. Call ap_run_insert_filter in time to be considered by the inbound > processing. (right after get_mime_headers() for instance). Using a single, > non parameterized function to add input and output filters to the stack with > the same call is trying to do too much with this one function. I cannot > point to a speficic problem this will cause but I am sure they exist. > > 2. Pass an additional parameter on ap_run_insert_filter designating whether > modules should insert their input filters or output filters. Call > ap_run_insert_filter(INSERT_INPUT_FILTERS) right after the call to > get_mime_headers(). Call ap_run_insert_filter(INSERT_OUTPUT_FILTERS) where > it is called today out of process_request_internal(). Modules would all have > to grok this parameter. > > 3. Another way to solve the this is to create a two new hooks to replace the > insert_filter hook: ap_run_insert_input_filter() & > ap_run_insert_output_filter() and call each hook at the appropriate point in > the cycle. > > 2 or 3 work for me. Leaning toward #3 right now. > > Ryan and Greg, opinions? > > Bill > >