Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 2861 invoked by uid 500); 18 Sep 2002 13:35:23 -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: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 2844 invoked from network); 18 Sep 2002 13:35:22 -0000 Subject: Re: [PATCH]: Update request in connection based filters From: Bojan Smojver To: Apache Dev List In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 18 Sep 2002 23:41:40 +1000 Message-Id: <1032356500.4424.171.camel@beast.rexursive.com> Mime-Version: 1.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N There is another possibility to fix this, and that's within the module itself (I've tested it and it works): -------------------------------------------------- static void logio_create_req(request_rec *r) { ap_filter_t *f; conn_rec *c = r->connection; /* Tie connection filters with request */ for (f = c->input_filters; f; f = f->next) f->r = r; for (f = c->output_filters; f; f = f->next) f->r = r; } static void register_hooks(apr_pool_t *p) { ap_hook_pre_connection(logio_pre_conn, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_create_request(logio_create_req, NULL, NULL, APR_HOOK_MIDDLE); ap_register_input_filter(logio_filter_name, logio_in_filter, NULL, AP_FTYPE_CONNECTION); ap_register_output_filter(logio_filter_name, logio_out_filter, NULL, AP_FTYPE_CONNECTION); } -------------------------------------------------- Since this looks like modules own business, it seems like a good compromise to me. What do you guys think? Also, I've think that the correct thing to do in mod_logio is to be AP_FTYPE_CONNECTION + 6, since SSL is AP_FTYPE_CONNECTION + 5, and we want to be before it in input filtering and after it in output filtering. I have the module working with r->notes for now. Bojan On Wed, 2002-09-18 at 13:22, rbb@apache.org wrote: > > You don't want to do this. A connection based filter is connection > oriented. By definition, it has no concept of a request. While this > might make sense for HTTP, other protocol modules will have a much harder > time with this change. > > Ryan