Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69437 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77547 invoked from network); 2 Oct 2013 07:17:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Oct 2013 07:17:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.169 as permitted sender) X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.217.169 mail-lb0-f169.google.com Received: from [209.85.217.169] ([209.85.217.169:35663] helo=mail-lb0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/F3-46515-098CB425 for ; Wed, 02 Oct 2013 03:17:37 -0400 Received: by mail-lb0-f169.google.com with SMTP id z5so412244lbh.0 for ; Wed, 02 Oct 2013 00:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=zIU9D47N9R5VMDgI6YENl4eqHdfhxXFtwT8dEylj5XE=; b=gXGyhM5DlDmRw5C8jRPlhFqTNSFM8ohiiD261uSzPBaz9PH0gmbtZ2lSK3rTPPNsHP 02hctRoAk+u6rO8YfY9ndvn5EyUTl3NW3Wx/LHHENbVgKsuXEP1w7GGvuRKceydfjU20 XpqBUEO/f+DxpIvO5S3usyOagqP00py1czU+nhpESKQUExl2Dpf/sMftVMrHRhYEby9E R+zatvYkv2WR+JglS2nwD7wS170AQOrf8HabVk9PqU34RRma8nxzKsY7TpyMjqEjDfX4 DI5HUAk8YuwBPYbXvRFl0muW4FJGVpI7dc8cA3cLadSnS7+rODacsELZ+Qu7BwVBZPa7 3cNA== X-Received: by 10.152.10.99 with SMTP id h3mr712535lab.13.1380698253067; Wed, 02 Oct 2013 00:17:33 -0700 (PDT) Received: from [10.9.26.35] (178-16-144-241.obit.ru. [178.16.144.241]) by mx.google.com with ESMTPSA id vs11sm228503lac.3.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Oct 2013 00:17:31 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_D929FF8D-63DC-4DD3-B45F-12E5DF9F1646"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) In-Reply-To: Date: Wed, 2 Oct 2013 11:17:22 +0400 Cc: PHP Internals Message-ID: <79A5CEBE-1E12-4842-9F7E-3A1F4925B6BD@gmail.com> References: To: Michael Wallner X-Mailer: Apple Mail (2.1510) Subject: Re: [PHP-DEV] HTTP supergloblas and request body/query (was: Parsing PUT data) From: indeyets@gmail.com (Alexey Zakhlestin) --Apple-Mail=_D929FF8D-63DC-4DD3-B45F-12E5DF9F1646 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 02.10.2013, at 10:59, Michael Wallner wrote: > Since ever people are confused by _GET and _POST superglobals, > because, despite their name, they do not (really) depend on the > request method. Therefor I propose to phase out $_GET and name it > $_QUERY and I propose to phase out $_POST and name it $_FORM (I'm not > 100% confident with the latter yet, though). >=20 > 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). (*) >=20 > There are already parsers for application/x-www-form-urlencoded and > multipart/form-data in the core. One could think of providing an API > to add content type handlers from extensions, ext/json may be an > example, like it is hacked into pecl_http-v2. >=20 > Thoughts, objections, insults? >=20 > (*) We'd probably have to revisit all *post* INI variables, though. So, that is not one, but three proposals: 1. _GET -> _QUERY, _POST -> _FORM I don't think this is really necessary. Names are there historically = and changing them will break a lot of stuff. +0 on aliasing, and soft-deprecation (via documentation) though 2. ignore request-method, trigger body-processing solely on Content-type +1. makes sense 3. expose body-parsers via php-level API +1. Hell, yes! Something like +1000, actually ;) --=20 Alexey Zakhlestin CTO at Grids.by/you https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc --Apple-Mail=_D929FF8D-63DC-4DD3-B45F-12E5DF9F1646 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQEcBAEBCgAGBQJSS8iMAAoJEMkJcRxZdR27x+UH/0p+FCZ2QagYl8m6T+y6BD3U qCgHajyujILKnW275jZdHnpkgk+mm1d3DMhULVgyZz35iNEFgDjsN7Shd96GYsYj SytLwLwKBFiDOWwUGE/3+iQWtJ60/ZtItFHU3KrD7MZRj7MI8SG+riF+uMIs1b9f tdbkRYBcP+iyOo2RhGTM+VNfn7zRgcSs31HvJfnOfGnI1yxwACHWFqgvoFnlrp5d suvxQJ1p805/ovj6O3ETphTtr/Br9MC52W6uks6mbvSnKtcMO0K9/OSExPnfbCib qZygvJnO8Ke6pOpR5t6AKCFnv646F7Hq3la0NEw7fSCydFpQjK2fNre+LdpdmSQ= =qWGZ -----END PGP SIGNATURE----- --Apple-Mail=_D929FF8D-63DC-4DD3-B45F-12E5DF9F1646--