Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78074 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5780 invoked from network); 14 Oct 2014 21:51:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2014 21:51:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.170 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:42183] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/79-18603-3FA9D345 for ; Tue, 14 Oct 2014 17:51:47 -0400 Received: by mail-wi0-f170.google.com with SMTP id hi2so12784504wib.5 for ; Tue, 14 Oct 2014 14:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Dk5fbF0yDJaVb1t38wO67b2LtD8u/JFmgvMGcffsrOc=; b=WqYW5tuPcej7807HHxFdExOCRSWzxEzeGuE9ftxLnLZHgtFZ5QDpxVu0ExOkkeExcQ Vry4D1kdp1dZE55daaPFltg1W789UrVv7j04o7fjrUx+YvLceSAcz0QgyAAMhOm/S3QJ JUftMddhh1kEyh9SI0ZZl85pAgkAIOXs5q86MsKiOognZt9gEs1ufwddOLnvtfsb1ZCt jTf1rxgWB5IknSH3FM3PR04uawvNv59Yhnig6iu3w1ikdJrN5iEH2wnYaCSEzPPP0goI 8ZAESiz7ws7Gaf7rNgnAABSyW3fpF4MZmInlV4VxjIzwOtVYd2dIt1kMXzd61/cfgl9F Nnvw== X-Received: by 10.180.73.18 with SMTP id h18mr5717807wiv.34.1413323504626; Tue, 14 Oct 2014 14:51:44 -0700 (PDT) Received: from [192.168.0.2] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id wx3sm21582244wjc.19.2014.10.14.14.51.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 14:51:43 -0700 (PDT) Message-ID: <543D9AED.90700@gmail.com> Date: Tue, 14 Oct 2014 22:51:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me> <543D47C1.9050009@lerdorf.com> <543D4CE1.5000109@lerdorf.com> <543D6864.10508@gmail.com> <543D85E6.2020507@lerdorf.com> <543D991E.7040405@gmail.com> In-Reply-To: <543D991E.7040405@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: rowan.collins@gmail.com (Rowan Collins) On 14/10/2014 22:43, Rowan Collins wrote: > On 14/10/2014 21:21, Rasmus Lerdorf wrote: >> On 10/14/2014 11:16 AM, Rowan Collins wrote: >>> On 14/10/2014 17:18, Rasmus Lerdorf wrote: >>>> I think 20+ years of history has proven this to be a non-issue. Of all >>>> the things that people get confused by in PHP, $_GET/$_POST are right >>>> near the bottom of the list. >>> The popularity of REST is what has changed this. Until people started >>> writing RESTful APIs, only two HTTP request types were in common use. >>> Nobody was confused about where PUT method data would end up, because >>> nobody processed any PUT methods. >>> >>>> It makes no sense to me to make $_BODY an alias for $_POST. $_POST >>>> implies the default body encoding that a broswer performs on a POST >>>> request. Making an alias called $_BODY that doesn't contain the >>>> body of >>>> a request unless it is "POST"-encoded would be super confusing. >>> The encoding has no relationship with the request type, even in >>> browsers >>> - the default encoding of a POST form is actually the same encoding >>> used >>> to produce a URL form a GET form. >> Sure, but $_GET/$_POST do. They were not named to match HTTP primitives. >> They were named to match form methods. As in form method="get" and >> method="post". And here the default encoding the browsers use for these >> two methods definitely matter. > > Like, I say, application/x-www-form-urlencoded is the default encoding > for both method="get" and method="post". The difference is that one > executes an HTTP GET, and appends the encoded data to the request URL, > while the other executes an HTTP POST, and encloses the encoded data > as the request body. > > Even coming from a browser form, both $_GET and $_POST can be > populated simultaneously, with independent data: > >
type="hidden" name="foo" value="body data" />
> Actually, I think I misunderstood your post (insert bad pun here about "I didn't get it") and should probably go to bed. I think this thread is probably just repeating itself now anyway. -- Rowan Collins [IMSoP]