Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78010 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93288 invoked from network); 14 Oct 2014 14:16:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2014 14:16:17 -0000 Authentication-Results: pb1.pair.com header.from=mike@mjdugan.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mike@mjdugan.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mjdugan.com from 209.85.216.43 cause and error) X-PHP-List-Original-Sender: mike@mjdugan.com X-Host-Fingerprint: 209.85.216.43 mail-qa0-f43.google.com Received: from [209.85.216.43] ([209.85.216.43:50144] helo=mail-qa0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/02-18603-F203D345 for ; Tue, 14 Oct 2014 10:16:16 -0400 Received: by mail-qa0-f43.google.com with SMTP id s7so5850752qap.2 for ; Tue, 14 Oct 2014 07:16:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version:content-type; bh=8NLO9PscNiS84CBkHXyy0l8kNnxo84uSGhwwcUzf2Gc=; b=czeqZGC3UcUKZUj0qO/i/1c70E9KL1EhnGfFMJez6BaElNkNZO4MGxhvqiBMPfUldP u5OpfQRrirpvcnNKG28TdnCwFHO9R1x45vMYiQyLU4KM3GNrx+yJDVVF5KHDhbp4/cu3 1PRfLhVKAayAb6g5J1iqbnka3Ntg3MKYrHooH36OYQZr/vBWAFIemXE6Yg39GaUNqxPz ugxsm6+sTmLOcTJvacw+afvkEQRwTNeusphWBqa3SV1+MOeK+JyKoukI3KQTu4v9r2az GXrMAEYfFmwLvBy2pOu33zIU3IDWb1XjKzOLj/XtWuzrfzjvHSNvS7GQ8CsRTODzIO/x +SNg== X-Gm-Message-State: ALoCoQkk9VO9hwAt33dkaP74KqJXrjjpmcG1geBbYel/sR5iNJRwWT2S3VoN/sO3pKfgfPaRrUNe X-Received: by 10.224.20.199 with SMTP id g7mr10128318qab.74.1413296172214; Tue, 14 Oct 2014 07:16:12 -0700 (PDT) Received: from Mikes-iMac.local (c-71-200-126-32.hsd1.md.comcast.net. [71.200.126.32]) by mx.google.com with ESMTPSA id 8sm15554807qab.12.2014.10.14.07.16.10 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 14 Oct 2014 07:16:11 -0700 (PDT) Date: Tue, 14 Oct 2014 10:16:10 -0400 To: Chris Wright , Kris Craig Cc: Andrea Faulds , Kristopher , PHP internals list , Chris Wright , Andrey Andreev Message-ID: In-Reply-To: References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me> X-Mailer: Airmail (249) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="543d302a_7545e146_12d" Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: mike@mjdugan.com (Mike Dugan) --543d302a_7545e146_12d Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --=C2=A0 Mike Dugan mike=40mjdugan.com On October 14, 2014 at 10:08:56 AM, Chris Wright (cw=40daverandom.com) wr= ote: On 14 October 2014 14:57, Kris Craig wrote:=C2=A0= > On Tue, Oct 14, 2014 at 6:50 AM, Chris Wright wro= te:=C2=A0 >=C2=A0 >>=C2=A0 >> ...but is also the wrong solution. It's not scalable,=C2=A0 >=C2=A0 >=C2=A0 > How is it not scalable, exactly=3F It's just a couple aliases.=C2=A0 Because in a few years when the =46OO request method has become=C2=A0 commonplace we will get requests to add support for =24=5F=46OO, and then= =C2=A0 =24=5FBAR, and the =24=5FCHEESE... where does it end=3F=C2=A0 >=C2=A0 >> and the only=C2=A0 >> sensible way to implement them would be as aliases of =24=5FPOST, beca= use=C2=A0 >> they would contain the same data. How does this fundamentally differ=C2= =A0 >> from =24=5FBODY (or whatever)=3F=C2=A0 >>=C2=A0 >=C2=A0 > It's not supposed to functionally differ. It's supposed to create some=C2= =A0 > better consistency and make it easier for devs to differentiate between= =C2=A0 > different REST methods when retrieving data. If REQUEST=5FMETHOD is PUT= ,=C2=A0 > then I can set the parsed params to the value of =24=5FPUT. The aliases= match=C2=A0 > the methods used, making the code that much more readable and scalable.= =C2=A0 To be brutally honest I see this as a discussion of highly=C2=A0 questionable merit anyway, due to the fact that in the overwhelming=C2=A0= majority of cases where the request method is not POST the entity body=C2= =A0 will not represent HTML form data - browsers don't make requests of=C2=A0= these methods with the involvement of client-side scripting at the=C2=A0 moment (or in the foreseeable future), the content type of the request=C2= =A0 body is *highly* unlikely to be something PHP would even attempt to=C2=A0= decode.=C2=A0 Sorry.=C2=A0 At this point I=E2=80=99m a bit confused about what the scope of the disc= ussion is. Are we talking about creating more semantic aliases for =24=5F= GET and =24=5FPOST, or integrating support to retrieve data from =24=5FPO= ST based on the HTTP method, or a little bit of both=3F =E2=80=94 Mike Dugan mike=40mjdugan.com --543d302a_7545e146_12d--