Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 95231 invoked by uid 500); 16 Jun 2003 20:38:05 -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 95108 invoked from network); 16 Jun 2003 20:38:04 -0000 Errors-To: Message-Id: <5.2.0.9.2.20030616153558.02358b28@pop3.rowe-clan.net> X-Sender: wrowe%rowe-clan.net@pop3.rowe-clan.net X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Mon, 16 Jun 2003 15:37:45 -0500 To: dev@httpd.apache.org From: "William A. Rowe, Jr." Subject: Re: Peek at POSTed data In-Reply-To: <6353D4DC26523B4587F5254CC0DD895101E19180@ehost006.intermed ia.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N You must implement a peek-ahead filter that sets aside the post body. Once someone calls the filter stack later, you simply return your set aside buckets. Several modules do something similar today, either for incomplete data (like charset_lite, which might not have a complete trailing character code sequence) or ssl (which might decrypt more data than the caller wished to have returned.) Bill At 02:19 PM 6/16/2003, you wrote: >I'm wondering if there is a nice way in Apache 2.0 to peek at the incoming POSTed data without removing the data from the view of other modules? So, for example, in my modules fixup stage I'd like to have a look at the POSTed data, but still be able to let a different module actually handle the request. > >I don't think an input filter would do the trick because I would need to see the posted data *before* another module has decided to actually handle the request. This means that I would need to initiate the reading of the data from the client myself - but that action would effectively remove the data from the module that will actually be handling the request. > >I was able to do this in Apache 1.3 by manipulating some of the values to do with the request_rec and conn_rec structures after I had run through the standard ap_get_client_block routines. It works well with Apache 1.3, but the same hack won't work in Apache 2.0.