Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50888 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33699 invoked from network); 7 Dec 2010 08:25:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2010 08:25:34 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:35173] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/A0-27705-87FEDFC4 for ; Tue, 07 Dec 2010 03:25:29 -0500 Received: by gyf2 with SMTP id 2so7170932gyf.29 for ; Tue, 07 Dec 2010 00:25:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=ILIzfp0Y72W3fRLVUfbL+NR3Od7qHwO2kvKV1URf/vg=; b=ZpDKkOGKwvBA53orquA1RogFFPLBg6NrtTdrS/Rj+Od2wv1dlWudzOGPrnVlBhR62H 3gJ1unaQev9vSEfWfN9IXhYVIg4JmQp+Re27Fy3X1VswWKXwdHlN9EuHNIdr2jbwakwv Ast7Hr81uJVzW0oeN1yE8+sdgydA8P4fFIFdg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=lWHj6mFnnoDK/yz7scYkJ2rnWBElzkLhX9AqyQmkPQz2OJZ4x9/NlfCTuyZxLRAmYO txO7IGxVCo89jYAFl20du9xaN81yRHMJJ2meTobw01H+1A2F1mZ9PGUHWeENulkDjHOq ne8sC/Nq55s0axF0t/M9FEMBf9V7srXS4Apy4= MIME-Version: 1.0 Received: by 10.90.3.31 with SMTP id 31mr9223620agc.141.1291710326091; Tue, 07 Dec 2010 00:25:26 -0800 (PST) Sender: tyra3l@gmail.com Received: by 10.90.53.4 with HTTP; Tue, 7 Dec 2010 00:25:26 -0800 (PST) In-Reply-To: References: Date: Tue, 7 Dec 2010 09:25:26 +0100 X-Google-Sender-Auth: mRvhodRCmLVOGCTMiXQlQ1lltcY Message-ID: To: Gustavo Lopes Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=00163631084323b1010496cdbf90 Subject: Re: [PHP-DEV] [PATCH] Add option to disable POST data processing From: info@tyrael.hu (Ferenc Kovacs) --00163631084323b1010496cdbf90 Content-Type: text/plain; charset=UTF-8 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? > > I like the idea. Tyrael --00163631084323b1010496cdbf90--