Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69446 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99808 invoked from network); 2 Oct 2013 11:12:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Oct 2013 11:12:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.179 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 74.125.82.179 mail-we0-f179.google.com Received: from [74.125.82.179] ([74.125.82.179:54303] helo=mail-we0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/02-23255-B8FFB425 for ; Wed, 02 Oct 2013 07:12:11 -0400 Received: by mail-we0-f179.google.com with SMTP id x55so717686wes.38 for ; Wed, 02 Oct 2013 04:12:08 -0700 (PDT) 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=t8w6CbbP95Nz3Qw3lM0e4zc8mnjyHORaPUGH43RdUg8=; b=m16svGv6EzUQJT5ywUZJz7/B1aEcYdDc8HsK2bTyly5R7Pp3Axm8E8F6vV901tcH0V qQF3bJletR6GKkEjCDzsZfmIUy1moMn510fXUhEBQktE7zVSDXYrkDmjYU8ZQLhIki+d 9/rDMA5iXDqvBVbznmDpzp9Tk+pnlcysBJUzy12rTZy8DkaOWus5S6hx2lKhwz4/Uf0i ZPfbStmgETyUhjgQHB0T03CncBl6IhunTnvpNE4GgSlxwnIPx7G6yDbeCLOK8E+fFjXw RU0LEsdDv/A6PeWe4ipuzECrjVZNXyZryyjd29oOjLFdCfAmPURz7T6cap3RXR2iRvQs tBkw== MIME-Version: 1.0 X-Received: by 10.194.94.137 with SMTP id dc9mr1744642wjb.38.1380712328447; Wed, 02 Oct 2013 04:12:08 -0700 (PDT) Received: by 10.216.182.193 with HTTP; Wed, 2 Oct 2013 04:12:08 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Oct 2013 12:12:08 +0100 Message-ID: To: Michael Wallner Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data) From: leight@gmail.com (Leigh) On 2 October 2013 07:59, Michael Wallner wrote: > I propose to phase out $_GET and name it $_QUERY and > I propose to phase out $_POST and name it $_FORM I have to say I'm against this aspect of the proposal. While the names may not be 100% accurate, _most_ people are used to their behaviour. You certainly won't be able to remove $_GET / $_POST (implied by "phase out") in any 5.x release, it's just too big of a BC break. > Further, I propose to remove the POST method restriction for handling > request bodies and solely rely on the content type to trigger the > parser(s). (*) This makes more sense, HTTP/1.1 spec states all methods (except TRACE) are allowed a body. This is where it could get pretty confusing though, since a GET is allowed a body that could populate $_POST. I still don't think it justifies the name change though. On 2 October 2013 08:31, Michael Wallner wrote: > > I had it, but I'm not sure $_BODY fits either, because it should be an > array. Currently only form data fits the purpose of de-serialisation > of a request body. > Not so sure about that. I don't think there is a rule that says a body _has_ to be in query string name=value format, or that multipart elements _have_ to have a name=something attribute. I could quite easily imagine PUT requests containing a textual body without an associated field name (the URI would contain the field name). (correct me if I'm wrong)