Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54218 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89935 invoked from network); 27 Jul 2011 00:20:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2011 00:20:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:46332] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/92-02095-8D95F2E4 for ; Tue, 26 Jul 2011 20:20:41 -0400 Received: by yxk8 with SMTP id 8so452789yxk.29 for ; Tue, 26 Jul 2011 17:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IxGV9s/fTa5xi+BwNCSXj65ign7xaJVLnfgECnK4ZKM=; b=FvhUW7yWvOeW09zvJ1Shn0P269c9AqxX6KHN+74S2a32QLVCi2zwKHtSg6AZG37hS3 Yi1kCxRKXYPzaZ4/9PlUcV0+gYPQt1cD1ni5gSlRPL7YhujUqXwszkdsYzqHrUjb9Y/T iPte4x6c02gkKmF7QXwv65MQoMoFySR5Jbilw= MIME-Version: 1.0 Received: by 10.236.77.42 with SMTP id c30mr8295080yhe.248.1311726037933; Tue, 26 Jul 2011 17:20:37 -0700 (PDT) Received: by 10.146.86.20 with HTTP; Tue, 26 Jul 2011 17:20:37 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Jul 2011 02:20:37 +0200 Message-ID: To: Gustavo Lopes Cc: "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [PATCH] Add option to disable POST data processing From: pierre.php@gmail.com (Pierre Joye) hi Gustavo, Could you apply your patch tomorrow please? So we have it for the alpha3 on Thursday. Thanks for your work! Cheers, On Tue, Dec 7, 2010 at 8:08 AM, Gustavo Lopes wrote: > The very simple attached patch adds an option to disable POST data > processing, which implies the data can only be read in a stream fashion > through php://input. > > As far as I know, PHP offers no way to inhibit processing RFC 1867 data and > one has to use very hacky means to accomplish that. This is often required > (or at least convenient) in order to, e.g., proxy requests or handle file > uploads in memory. > > For other types of requests, the default processing of POST data may also be > a problem. Take a non-application/x-www-form-urlencoded POST requests (say, > some kind of RPC with a big XML payload) -- PHP is very memory inefficient > as it will hold the whole POST data into memory and duplicate it twice (from > SG(request_info).post_data to $HTTP_RAW_POST_DATA -- even if > always_populate_raw_post_data=0 -- and SG(request_info).raw_post_data). > > This introduces a new ini setting, disable_post_data_processing, but it's a > benign one. No incompatibilities between setups will arise because no one > will enable it globally (it would be insane), only selectively to the > scripts that require it. The reason for an ini setting is that it must be > set early in the request life. > > Thoughts? > > -- > Gustavo Lopes > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org