Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78775 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56331 invoked from network); 6 Nov 2014 03:00:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2014 03:00:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 74.125.82.44 mail-wg0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:49177] helo=mail-wg0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/55-28384-434EA545 for ; Wed, 05 Nov 2014 22:00:05 -0500 Received: by mail-wg0-f44.google.com with SMTP id x12so168280wgg.3 for ; Wed, 05 Nov 2014 19:00:01 -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=HurRrkijkLqVI9ixSb0PBLCytlHwQMptMR/XQhO5Uw8=; b=shWuwYpjiSs7NrQ/as2qmSe0L/fHwtwZntyDdJycNP1iJjvGCw3J/8BkBGEIWS/oVP jNxZK/FDb0n8cHo3bmzEMZruG/kLd0k/SFvMWEu166zxbVFup9qgpKstCkcT08gY52ox uE3bkZZC7RUvWOecPxxY+ZGiF12vrrvH9fCx1tj5CKjE8n3B+rbyQ/OoH/CX32Losc0A 2oyoTKDjzK7xupa4G5YHBl+iuymqQDhoRHSHtP4Vx9ebapBZpiLAhRWjHdsXCwLup4rR ZodeP67Ripdc+LW/D+5J1aYQD0o1IqBYP3Z+LTX+HzmlboeOBgcftHxdmnqMonkntAel 0fnQ== MIME-Version: 1.0 X-Received: by 10.180.11.227 with SMTP id t3mr10681678wib.45.1415242801248; Wed, 05 Nov 2014 19:00:01 -0800 (PST) Received: by 10.216.123.4 with HTTP; Wed, 5 Nov 2014 19:00:01 -0800 (PST) In-Reply-To: References: <1DDB6E05-3143-4A74-8B13-AF85222579BA@ajf.me> <468730E8-4C38-49A3-A61A-59E107313D79@ajf.me> Date: Wed, 5 Nov 2014 22:00:01 -0500 Message-ID: To: Will Fitch Cc: Andrea Faulds , Patrick ALLAERT , PHP Internals Content-Type: multipart/alternative; boundary=001a11c2400c707fde050727e4cc Subject: Re: [PHP-DEV] New Standardized HTTP Interface From: theanomaly.is@gmail.com (Sherif Ramadan) --001a11c2400c707fde050727e4cc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Nov 5, 2014 at 9:36 PM, Will Fitch wrote: > > > > Easy - you have no idea what the input type is from PUT without checking > the incoming type. With POST, you know exactly what it is. PUT input cod= e > be JSON, multipart mime, a file or a whatever the dev wants. > That's not necessarily true. There are many APIs that will send POST requests with a JSON payload in the request body. This is specifically why PHP won't bother parsing the request entity body unless the content-type header is form ulr-encoded. Additionally you have to take Content-encoding[1] into consideration as HTTP doesn't require that the body of a POST request be url-encoded, just that the client specifies the content-encoding and content-type[2][3] for entity decoding and then it becomes up to the server how to handle or even accept the entity. [1] http://tools.ietf.org/html/rfc2616#section-14.11 [2] http://tools.ietf.org/html/rfc2616#section-14.17 [3] http://tools.ietf.org/html/rfc2616#section-7.2.1 > > You=E2=80=99re suggesting we change the fundamental approach of PHP in te= rms of > what these superglobals represent. Not at all, $_GET and $_POST in PHP have always represented form data. I wish to keep that intact. This approach merely amends under which HTTP verbs form data can be accepted and the potential to accept media types other than form/url-encoded. If the latter part deviates too much from the concept of form data (it likely does) then that can become a separate vote in the RFC. > I think from the feedback on this list, the approach you=E2=80=99re sugge= sting is > far from welcome. Perhaps this is something you should stop arguing and > start looking at improving your RFC with something that=E2=80=99s differe= nt and > potentially acceptable. > > Improving the RFC is precisely what I'm looking to do :) Surely the only way to find out what is or is not acceptable is to poll others get some form of popular consensus. Perhaps you should take the discussion as less of a battle and more of an opportunity to voice individual objectivity? I have no intention of being hostile. I'm also more than open to the possibility that this RFC may not be favored, but that doesn't negate the effort to build a more favorable RFC based on this discussion. --001a11c2400c707fde050727e4cc--