Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78798 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5445 invoked from network); 6 Nov 2014 08:56:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2014 08:56:31 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.177 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.177 mail-wi0-f177.google.com Received: from [209.85.212.177] ([209.85.212.177:58193] helo=mail-wi0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/1E-28384-EB73B545 for ; Thu, 06 Nov 2014 03:56:31 -0500 Received: by mail-wi0-f177.google.com with SMTP id ex7so786051wid.4 for ; Thu, 06 Nov 2014 00:56:27 -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=ZDdHDn3vkffQxahFgpf8CrkqsSo034dyp0J6XqFA638=; b=K21l5Lw494dJ+vt9B6fbV74m8ljlpLK0BQdQ3RY+6YAPH6xwMvN9VXTlt0+tFO6JyA gCM90Sysrrp1BxevCVJf5lYRlY8xRZkTb7cLNCxNvyD1Kj8+roWFWo0VSiVP9mWyk+is ARQpxlgMmY8SLxyk1nUHveSVClUEEDHGiEuRaYwr9BE5RJZKQB8alUkgfKyEQz5f0Ea7 9P2slcmEvcmQKwiO2zKfSovYsTDIodxbADWCGZpFpc4vgl/zwKuHQ3p20ysSyrI7TY4e nX16C/VbX5klE8HbhixR/tpUm11NOubEBj/8AyZpTMohJc4myeQ3h0zSiZw9g+mNR0GV utvw== MIME-Version: 1.0 X-Received: by 10.180.14.165 with SMTP id q5mr4578396wic.0.1415264187251; Thu, 06 Nov 2014 00:56:27 -0800 (PST) Received: by 10.216.123.4 with HTTP; Thu, 6 Nov 2014 00:56:27 -0800 (PST) In-Reply-To: References: <1DDB6E05-3143-4A74-8B13-AF85222579BA@ajf.me> <468730E8-4C38-49A3-A61A-59E107313D79@ajf.me> <9FB8B541-A040-4C0E-8884-A1EA06B3C266@php.net> Date: Thu, 6 Nov 2014 03:56:27 -0500 Message-ID: To: Sanford Whiteman Cc: Will Fitch , Andrea Faulds , Patrick ALLAERT , PHP Internals Content-Type: multipart/alternative; boundary=f46d04138ae32500ff05072cdf38 Subject: Re: [PHP-DEV] New Standardized HTTP Interface From: theanomaly.is@gmail.com (Sherif Ramadan) --f46d04138ae32500ff05072cdf38 Content-Type: text/plain; charset=UTF-8 On Thu, Nov 6, 2014 at 3:20 AM, Sanford Whiteman wrote: > > Nowhere did I suggest that the request verbs themselves (i.e. PUT and > POST) have the same intent. Just > > that the handling of multipart-form data is not specific to either one of > > those verbs. > > Define "handling." :/ > Specifically, parsing the form data and populating it somewhere accessible to the user as it is today in $_POST and making any binary upload available in $_FILES or some other fashion. Ideally, making handling PUT more consistent with the way PHP handles POST. > > "Handling" as in "interpreting multipart/form-data as key-value > pairs": a specific, intimate relationship with POST exists in RFC 1867 > First of all, RFC 1867 is not a standard. It's an experimental protocol definition. No where in the internet standards tracking documents do I see a definition that restricts multipart/form-data to POST. I think what you're referring to is the fact that the client UAs typically only ever handle form data as multipart/form-data mime as POST-specific requests. This is of course tied to the fact that client UAs don't typically follow the same intents of a RESTful API client/server relationship. Allow me to re-iterate the fact that this is one of the primary focuses of this discussion. That people normally want to deal with PUT requests in PHP under the umbrella of building their own RESTful APIs. > > > I see no reason why this would be a negative impact on PHP. > > Because if someone PUTs 2 GB of multipart/form-data I don't want it > decoded just because somewhere in my code path there's a reference to > $_POST. > > It's the same thing as with a POST request today in PHP. Nothing is stopping anyone from sending a you 2 GB multipart/form-data POST request either. You should be checking intent before dealing with $_POST from the $_SERVER['REQUEST_METHOD'] anyway, since you can't realy on $_POST necessarily being indicative of the request method anyway. > -- S. > --f46d04138ae32500ff05072cdf38--