Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70378 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37578 invoked from network); 25 Nov 2013 15:35:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Nov 2013 15:35:31 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass 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.128.48 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.128.48 mail-qe0-f48.google.com Received: from [209.85.128.48] ([209.85.128.48:55014] helo=mail-qe0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/06-34377-04E63925 for ; Mon, 25 Nov 2013 10:35:29 -0500 Received: by mail-qe0-f48.google.com with SMTP id gc15so4000783qeb.7 for ; Mon, 25 Nov 2013 07:35:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=L3alzVIjdxw0u2LfkKd7KentsKtAG46s2P66uP0Glx0=; b=k6bPuJCEWHd0QMPJlqpKoidtDYRkO5uD3HX7ogEHNhO7FOoYHZR71kD2ve/6f9Ujrd MTm+hWQW7t1saYWpWQDpfUIa5Y0kcgJ/uYOWZ1fCF3gvDgAwxe9fDQwcslAi5zHa2CvW IT6vST0vy2FTMf6fnH8EAIrIXJBHT3Nk8bhyu64nW1goIXituXOtBFjuuQbEcrRTP2Gr rTMKlzG45BZ2P2x1/Jlg70ezoyDKDqQ1+5nZYN7wt4Bu29pR7lcq1gPExeTMLMpVHLCi P3xsDB5gxxp3v9gdpJykryHQ6CCuyL4cIy+2Baqst5IISTExuQ4kTElFFRNtdtzIy7+9 ceuQ== MIME-Version: 1.0 X-Received: by 10.49.127.101 with SMTP id nf5mr47361269qeb.61.1385393725246; Mon, 25 Nov 2013 07:35:25 -0800 (PST) Received: by 10.140.37.179 with HTTP; Mon, 25 Nov 2013 07:35:25 -0800 (PST) In-Reply-To: References: Date: Mon, 25 Nov 2013 16:35:25 +0100 Message-ID: To: Michael Wallner Cc: Yasuo Ohgaki , Julien Pauli , Adam Harvey , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b6dc0bcde14dc04ec021cf4 Subject: Re: [RFC] Slim POST data (was: PHP-5.6 and $HTTP_RAW_POST_DATA) From: tyra3l@gmail.com (Ferenc Kovacs) --047d7b6dc0bcde14dc04ec021cf4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Nov 25, 2013 at 4:29 PM, Michael Wallner wrote: > On 23 November 2013 22:40, Ferenc Kovacs wrote: > > > > > > After thinking about this, I think I figured out a way to provide this > > improvement in 5.6 without the BC break and marking the old behavior > > deprecated so people using it can prepare for the removal of > > $HTTP_RAW_POST_DATA. > > before I describe it, here is some context, feel free to point out any > > error/misunderstanding: > > > > $HTTP_RAW_POST_DATA is a global, but not a superglobal, which means we > can't > > really track and trigger an E_DEPRECATED when accessed, because that > would > > add an overhead for any access for global variables. > > $HTTP_RAW_POST_DATA (up until the introduction of this improvement) wil= l > be > > populated if enable_post_data_reading is not set to Off(this ini is > present > > since php 5.4) and any of these conditions are met: > > > > the always_populate_raw_post_data ini is set to true > > php is provided with an unrecognized MIME/content type > > > > the change in master(which was then branched to 5.6) removed the > > always_populate_raw_post_data ini settings and the $HTTP_RAW_POST_DATA > > global, so it will be never automatically populated. > > this breaks BC > > > > Here is what I would propose: > > > > reintroduce always_populate_raw_post_data, but turn it into an integer > from > > a bool to an entry, which can take -1/0/1 as possible values, where 0 > and 1 > > are the old On and Off behavior, and -1 would disable the population of > > $HTTP_RAW_POST_DATA completely, this way people who want the performanc= e > > gain can opt-in. > > reintroduce the population of the $HTTP_RAW_POST_DATA via reading the > data > > from the new stream which Mike introduced, this way we would keep BC fo= r > > those who doesn't explicitly opt-in for this new feature. > > trigger an E_DEPRECATED error when the always_populate_raw_post_data in= i > > setting is (explicitly or implicitly via not specifying) is set to > anything > > else but -1, with an error message, which tells people that > > $HTTP_RAW_POST_DATA will go away in the future. > > > > what do you think? > > Sounds doable! I'd implement the INI with 1, "On", 0, "Off", and -1, > "Never" settings, if nobody objects (the first two for BC and "Never" > to complement). > > sorry, of course I meant 0 for Off and 1 for On. thanks for your help! --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --047d7b6dc0bcde14dc04ec021cf4--