Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 93846 invoked by uid 500); 1 Oct 2002 18:50:37 -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 93779 invoked from network); 1 Oct 2002 18:50:36 -0000 Date: Tue, 01 Oct 2002 11:51:12 -0700 From: Justin Erenkrantz Reply-To: Justin Erenkrantz To: dev@httpd.apache.org Subject: Re: PHP POST handling Message-ID: <2147483647.1033473072@[10.0.1.11]> In-Reply-To: <20021001111246.H16732@lyra.org> References: <20021001101658.D16732@lyra.org> <20021001111246.H16732@lyra.org> X-Mailer: Mulberry/3.0.0b4 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Spam-Status: No, hits=-4.7 required=5.0 tests=IN_REP_TO,REFERENCES,SPAM_PHRASE_00_01 version=2.50-cvs X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --On Tuesday, October 1, 2002 11:12 AM -0700 Greg Stein wrote: > I simply don't think that a filter should read/consume a request body. The > handler is responsible for handling the request, which includes processing > the body. Wellllll, PHP doesn't exactly do that. PHP's current strategy is to create an input filter that setsaside all input. This is triggered by the ap_discard_request_body() call in default_handler (as discard causes all data to be read). So, when data is actually pushed down into the output filter chain, PHP has a copy of the body in its private structure. And, if its script requires the body, it returns the ctx->post_data value in its callbacks. I think the biggest concern is when multiple modules want the input body. Right now, it's fairly vague what will happen (and I'm not even sure what the right answer is here). Forcing input filters and doing setasides (flat void* instead of bb's in PHP) seems a bit clunky. However, we also don't want to store the request body in memory. -- justin