Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60561 invoked from network); 6 Nov 2014 03:35:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2014 03:35:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:58198] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/16-28384-37CEA545 for ; Wed, 05 Nov 2014 22:35:17 -0500 Received: by mail-wi0-f176.google.com with SMTP id h11so284403wiw.3 for ; Wed, 05 Nov 2014 19:35:11 -0800 (PST) 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=c3DgcPGDBgh5FE0Nl8se1SFhIkl/mZlBw4Lh60eDSWw=; b=ytKf771cCxxjRkgPdtYd7oTFVTFY8XrRZHEswnAaOo8IW0f9L9ps2XSaS7BPykzN0q c8rb2UUy10vcKnABX+jYS2nBxVItj1NB0RAp4ghCCy6m4d8Wn+VnPXJQ8n2p8GbUnlGT vr2jV/5i9FGT0eHFEOyrdvQn7HkVmsmyfFUcw5uxhESWvg0rFHuO4FkmyqIIagWP0yKn jrrTKx9PevreQjbuEmFBnnCla0/hufQHJ6o/5oh1ZU+d/w59PpnsHl7F4iWzagwn6+SU iSFEVrW02fscyJxedZkz1Fvi4mP2H8dBi1BXyJmAqGTYrqx55FqZc2wuAZK8c64xBbf4 id3A== MIME-Version: 1.0 X-Received: by 10.194.63.145 with SMTP id g17mr1821325wjs.80.1415244911673; Wed, 05 Nov 2014 19:35:11 -0800 (PST) Received: by 10.216.123.4 with HTTP; Wed, 5 Nov 2014 19:35:11 -0800 (PST) In-Reply-To: <20141106030333.5955732.90669.642@gmail.com> References: <1DDB6E05-3143-4A74-8B13-AF85222579BA@ajf.me> <468730E8-4C38-49A3-A61A-59E107313D79@ajf.me> <20141106030333.5955732.90669.642@gmail.com> Date: Wed, 5 Nov 2014 22:35:11 -0500 Message-ID: To: Sanford Whiteman Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7bacb5023b147705072862be Subject: Re: [PHP-DEV] New Standardized HTTP Interface From: theanomaly.is@gmail.com (Sherif Ramadan) --047d7bacb5023b147705072862be Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Nov 5, 2014 at 10:03 PM, Sanford Whiteman wrote: > For the umpteenth time, *in what situation must you PUT > multipart/form-data or multipart/x-www-form-urlencoded only to treat it, > semantically, as a POST*? Which UA cannot send a POST? It's like we're > completely upside down on this thread. > If you're PUTing such POSTful content-types for any reason other than > storing the entire resource, you're doing HTTP wrong. Truthfully: if > someone said, "Yeah, so we got into PUT lately, we use it for Ajax form, > er, posts, for, um, speed or something," would you not be like, "Wat?" > The HTTP specification doesn't restrict how the request body is encoded based on the request verb. That is up to the content-type and content-encoding headers. The request verbs themselves are indicative of intent in the request, not necessarily the composition of said request. So we're dealing with decomposition not intent. That part is up to the user not PHP. multipart form data is useful for including both form data and binary data with successive parts. Typically the method applied for this mime in the client UA is POST, but many APIs may apply a PUT request using multipart form. There's no reason to be restrictive of that in PHP if we doesn't break compatibility, I don't think. These are real world problems that people deal with in on the web every day= . Here are some sources to demonstrate real world use cases and issues: - https://github.com/symfony/symfony/issues/9226 - https://www.drupal.org/node/1270190 - http://uncorkedstudios.com/blog/multipartformdata-file-upload-with-angularj= s - https://bugs.php.net/bug.php?id=3D55815 Let's face it. The web is a very imperfect place, but it's very tolerance to fault is what makes it work so well. Clearly we don't agree with everything that's done on the web, but that doesn't mean we can't help make PHP a little more useful on the web. > > -- S.=E2=80=8E > --047d7bacb5023b147705072862be--