Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70332 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82861 invoked from network); 23 Nov 2013 21:40:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2013 21:40:05 -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.216.47 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.47 mail-qa0-f47.google.com Received: from [209.85.216.47] ([209.85.216.47:61635] helo=mail-qa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/E1-07495-3B021925 for ; Sat, 23 Nov 2013 16:40:03 -0500 Received: by mail-qa0-f47.google.com with SMTP id w5so1671115qac.6 for ; Sat, 23 Nov 2013 13:40:00 -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=DDbUezLPMsnlKys8fdE2aOIw8zpodLreo/TLIcaZ648=; b=pXXRuApHiC5UK/OCYWvNKU8OY/av9Pse7ndL/Tir9oVnO8G2nSTua5KF2KvrDODIzg FOQTmbiA7HM4gDkZS9NyQKKHVepv0rFAec9Pw13KEO0U9dF4HGuXir8QK/Fajy5h4cma m7naYoHX0n0zldlFoY9evNCDp7ldw+1SmBJAAAQafRX41aycI8n/Mjju7HD5+LOBqueZ tSWa1tjM91HfqpHSBxQzvKPLAgDIeR2NiDKPfYP8n8PD8Kl2Rwk6RN55kbX7snJ5gfoy BumSafOoZT85eS3u8XzBCTIIAC3bHHi31y8niIIwIzvfbbLScTD7qOikS+tU8J6Q7f/a /Gng== MIME-Version: 1.0 X-Received: by 10.224.40.138 with SMTP id k10mr32646041qae.67.1385242800395; Sat, 23 Nov 2013 13:40:00 -0800 (PST) Received: by 10.140.37.179 with HTTP; Sat, 23 Nov 2013 13:40:00 -0800 (PST) In-Reply-To: References: Date: Sat, 23 Nov 2013 22:40:00 +0100 Message-ID: To: Michael Wallner Cc: Yasuo Ohgaki , Julien Pauli , Adam Harvey , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7bdc89fa0bb92b04ebdef9e0 Subject: Re: [RFC] Slim POST data (was: PHP-5.6 and $HTTP_RAW_POST_DATA) From: tyra3l@gmail.com (Ferenc Kovacs) --047d7bdc89fa0bb92b04ebdef9e0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Nov 19, 2013 at 10:46 AM, Michael Wallner wrote: > On 19 November 2013 02:38, Yasuo Ohgaki wrote: > > Hi Julien, > > > > On Mon, Nov 18, 2013 at 10:33 PM, Julien Pauli wrote: > >> > >> Please, remember that our release process forbidds BC breaks. > >> > >> I suggest reintroducing the feature, together with > >> always_populate_raw_post_data (like the old behavior). > > > > > > What we need is vote for the change? > > > > Mike, could you prepare RFC whether we keep the ini setting or just use > > "input://". > > I think it's time to vote. > > Here you go, https://wiki.php.net/rfc/slim_post_data > Though, with only two supporters, chances are low. > > > -- > Regards, > Mike > 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 th= at would add an overhead for any access for global variables. - $HTTP_RAW_POST_DATA (up until the introduction of this improvement) will 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_DA= TA 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 populati= on of $HTTP_RAW_POST_DATA completely, this way people who want the performa= nce 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 B= C for those who doesn't explicitly opt-in for this new feature. - trigger an E_DEPRECATED error when the always_populate_raw_post_data ini 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? --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --047d7bdc89fa0bb92b04ebdef9e0--