Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 42183 invoked from network); 28 Sep 2003 19:40:36 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 28 Sep 2003 19:40:36 -0000 Received: (qmail 81464 invoked by uid 500); 28 Sep 2003 19:40:20 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 81421 invoked by uid 500); 28 Sep 2003 19:40:19 -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 81408 invoked from network); 28 Sep 2003 19:40:19 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 28 Sep 2003 19:40:19 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A3hP6-0003uZ-00 for ; Sun, 28 Sep 2003 21:40:24 +0200 Mail-Followup-To: dev@httpd.apache.org X-Injected-Via-Gmane: http://gmane.org/ To: dev@httpd.apache.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A3hP4-0003uR-00 for ; Sun, 28 Sep 2003 21:40:22 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A3hP4-0004bN-00 for ; Sun, 28 Sep 2003 21:40:22 +0200 From: Joe Schaefer Subject: Re: Input filter and setting HTTP headers in Apache 2.0 Date: 28 Sep 2003 15:40:21 -0400 Lines: 32 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N albertochan@att.net writes: > [...] > > > > Why don't you just write a fixup handler with libapreq-2? > > AFAICT libapreq-2's mod_apreq (filter) handles these details > > for you. > > > > I did have the sense that what I was trying to do running under the > HTTP_IN filter an impossible task to achieve. That is until I took a > look at libapreq-2. Since my concern was modifying the request body, I > misled myself by trying to write a connection filter, when a resource > one was what I needed. It's quite a tricky problem. mod_apreq went through quite a few redesigns before arriving at the current implementation. libapreq-2 users need mod_apreq to pull double duty as both (1) an active (pull) parser with a spool sitting right behind HTTP_IN. (2) a passive (push) parser sitting at the very end of the input filters. Handlers that run before the content handler need mod_apreq in mode (1), whereas the content handler and any subsequent output filters need mode (2). The current implementation of mod_apreq relies on the filter_init() call to switch from mode (1) to mode (2). I'm not sure how smoothly this changeover happens on an internal redirect (httpd-apreq-2 doesn't have any tests written for redirects), but I suppose we'll cross that bridge as we come to it :-). -- Joe Schaefer