Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:78096
Return-Path: <park.framework@gmail.com>
Mailing-List: contact internals-help@lists.php.net; run by ezmlm
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 4983 invoked from network); 15 Oct 2014 15:05:05 -0000
Received: from unknown (HELO lists.php.net) (127.0.0.1)
  by localhost with SMTP; 15 Oct 2014 15:05:05 -0000
Authentication-Results: pb1.pair.com smtp.mail=park.framework@gmail.com; spf=pass; sender-id=pass
Authentication-Results: pb1.pair.com header.from=park.framework@gmail.com; sender-id=pass
Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.173 as permitted sender)
X-PHP-List-Original-Sender: park.framework@gmail.com
X-Host-Fingerprint: 209.85.214.173 mail-ob0-f173.google.com  
Received: from [209.85.214.173] ([209.85.214.173:36559] helo=mail-ob0-f173.google.com)
	by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
	id CE/36-03764-02D8E345 for <internals@lists.php.net>; Wed, 15 Oct 2014 11:05:04 -0400
Received: by mail-ob0-f173.google.com with SMTP id wp4so1177141obc.32
        for <internals@lists.php.net>; Wed, 15 Oct 2014 08:05:01 -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:content-transfer-encoding;
        bh=qVQBssEzcPpz9xZ5AEajwrN8ijKKv1DvDWF9+RoD1ZE=;
        b=J5LdlGz+LBwWUVraUlKVOKp0RAkzdJMlCYjuhFRM73D9Q7aiqVXRF1Ky4hyzI60XsR
         fviup9HkgeJa5+57r240vMB5O5+YXDYeK4SBcm/HPDv1oNiz4g9le0+CH05sVUUkXGZC
         QlydmNhB3VV9BY+vrrX+BSDhf4D1YgjiFXluL9OH+DixCSeWL0y6qXqCc+Z4vHzZahsF
         eUvMxRL/dymnHhzqTMD0hhMyZaxaR/DPLLlCCl+iSdvTY5CzYq7muH8TzmKIZ97mwNiv
         Ea6NiVWzmjAjTEyt9w2Bl5ikHt9e1mVD0uDKPfMCVe+Tuv1FEzl3R3u7U99q6xLdXP95
         KFFA==
MIME-Version: 1.0
X-Received: by 10.182.171.1 with SMTP id aq1mr2175962obc.64.1413385501612;
 Wed, 15 Oct 2014 08:05:01 -0700 (PDT)
Received: by 10.76.23.37 with HTTP; Wed, 15 Oct 2014 08:05:01 -0700 (PDT)
In-Reply-To: <543DCE2B.8010506@sugarcrm.com>
References: <CAKOpQSwS=Xck41sQQyEYGG8L3VHq+fRWjy0dDorbwZaVWMLCow@mail.gmail.com>
	<776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me>
	<CAKOpQSwRtSU1LNmftyY1b09SONBCfwS-qiMK4gct6uFiW3CSjw@mail.gmail.com>
	<CAPhkiZwb13FmX+sQLx0Ki52KuwJ4HWTj-84UqcZq3GYPFL8Tnw@mail.gmail.com>
	<E8F7D721-767C-4E6E-B0BB-F0DEFEB308B2@ajf.me>
	<CAF9U7z_0cgwWFEoShU9rJhoOZttztcZk_NAqoXnSuAro-w3kew@mail.gmail.com>
	<8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me>
	<543D47C1.9050009@lerdorf.com>
	<etPan.543d4c0e.216231b.12d@Mikes-iMac.local>
	<543D4CE1.5000109@lerdorf.com>
	<543D6864.10508@gmail.com>
	<543D85E6.2020507@lerdorf.com>
	<CAKOpQSyTSZeXppZ-f9OeNfA9=Q58jte1fH6zcuzxYZ+qK7-6JA@mail.gmail.com>
	<57b7a3681d6c2c7ae123c8921b2d19d6@mail.gmail.com>
	<CAPRqa+HZz2UKS564QAeyvLLUByNYLPZ7UCL7oYcgxHxn2R+8Yg@mail.gmail.com>
	<543DCE2B.8010506@sugarcrm.com>
Date: Wed, 15 Oct 2014 18:05:01 +0300
Message-ID: <CAPRqa+Ey4AEFGhxedOOC2A5AR==jgkZHHmQ9rjY5fxOW1og_yw@mail.gmail.com>
To: Stas Malyshev <smalyshev@sugarcrm.com>
Cc: Zeev Suraski <zeev@zend.com>, Kris Craig <kris.craig@gmail.com>, 
	Rasmus Lerdorf <rasmus@lerdorf.com>, Rowan Collins <rowan.collins@gmail.com>, 
	PHP internals list <internals@lists.php.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: [PHP-DEV] New globals for PUT and DELETE
From: park.framework@gmail.com (Park Framework)

2014-10-15 4:30 GMT+03:00 Stas Malyshev <smalyshev@sugarcrm.com>:
> Hi!
>
>> PHP today to enable successful & easy implementation of RESTful
> interfaces.
>
> Having done this, I beg to differ.
>
>> Try to send a parameter in the body, by PUT method, for reading
>> parameters have to use an ugly way file_get_contents(=E2=80=98php://inpu=
t')
>
> What exactly is the problem in this one-liner?
>
>> But yet worst, you can not do upload files and send parameters because
>> - php://input is not available with enctype=3D"multipart/form-data"
>
> I'm not sure I understand what you're trying to do, could you explain in
> more detail with examples?

PUT /url
Content-type: application/x-www-form-urlencoded

parse_str (file_get_contents(=E2=80=98php://input'), $_POST) // Ok

PUT /url
Content-type: multipart/mixed; boundary=3D"xxxx"

file_get_contents(=E2=80=98php://input') // Empty string