Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78434 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74650 invoked from network); 28 Oct 2014 16:16:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Oct 2014 16:16:19 -0000 Authentication-Results: pb1.pair.com header.from=catch.dave@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=catch.dave@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.45 as permitted sender) X-PHP-List-Original-Sender: catch.dave@gmail.com X-Host-Fingerprint: 74.125.82.45 mail-wg0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:43304] helo=mail-wg0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/B8-21571-151CF445 for ; Tue, 28 Oct 2014 11:16:18 -0500 Received: by mail-wg0-f45.google.com with SMTP id x12so1242494wgg.28 for ; Tue, 28 Oct 2014 09:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=xsiK0ANy4NKiF3AUEIIIzjyL1v4o1HEYYOEu2TQqdF8=; b=wcvFjZnDTAle7vEMubr0nE+4mNnizmkFRUaRfenbmB2lAUyPkWxDSa5i9TThHwWqxn DkC5U0aIPG5IyH5ptbTVmm9Gr3GDROAv1VkTktnjW2RTutkG9CHRP/LRCl6wDzXnRXhB tYscWIHy9z4X6KbM+Nb3S5uQi0t/A8pYa+Q8r0DNDYhk0j//OXHUsntqlOiussoAmqfk e2myAEyWRpkyscvDo8bPVcf0u86EjzX88/MSwDHGbeJ6RCUT0tXcF2BuhUJQpP1rPZvq 6TsFX5Cs2Xs0+zsdprM6DDlEsZH97QgOWW0PKvBZ4rYUNJLjQLyBnTEzcaANbOx2rr5g PYLw== X-Received: by 10.180.91.13 with SMTP id ca13mr6022634wib.1.1414512974684; Tue, 28 Oct 2014 09:16:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.76.148 with HTTP; Tue, 28 Oct 2014 09:15:53 -0700 (PDT) In-Reply-To: <544D65F7.8070807@sugarcrm.com> References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me> <543D47C1.9050009@lerdorf.com> <543D4CE1.5000109@lerdorf.com> <543D6864.10508@gmail.com> <543D85E6.2020507@lerdorf.com> <57b7a3681d6c2c7ae123c8921b2d19d6@mail.gmail.com> <544D65F7.8070807@sugarcrm.com> Date: Tue, 28 Oct 2014 09:15:53 -0700 Message-ID: To: Stas Malyshev Cc: Zeev Suraski , Kris Craig , Rasmus Lerdorf , Rowan Collins , PHP internals list Content-Type: multipart/alternative; boundary=f46d043d671362ea3605067df765 Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: catch.dave@gmail.com (Dave) --f46d043d671362ea3605067df765 Content-Type: text/plain; charset=UTF-8 1. Sure, but the frustrating thing is that the C code (for mime-parsing) is already there and just not being used for non-POST methods. Why make everyone use pecl/framework code that duplicates what exists in PHP already (albeit for POST only)? 2. You're right. That would be too many. That's why adding a single new variable of $_FORM/BODY/foo would work for everything (including POST). Of course, $_FILES (whose name is already method-agnostic) should be populated too and not restricted to POST only. On 26 October 2014 14:21, Stas Malyshev wrote: > Hi! > > > The only way to do this in PHP now is write a userland function that > parses > > multipart form data, which is non-trivial. I had written one, but would > > It is true that PUT data need to be parsed, however it is not true you > have to implement MIME parsing from scratch. There are frameworks that > implement that. Not everything must be written in C. But if you want C, > doesn't pecl/http already have the required bits? > > > Having the ability to access the data provided in $_POST for other > methods > > is ideal (by whatever means: $_PUT, $_FORM, get_parsed_form_data(), etc). > > There are a lot of HTTP verbs - PUT, DELETE, TRACE, PATCH... And what if > you want to do WebDAV? Wouldn't having separate superglobal for each be > taking it a bit too far? > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > --f46d043d671362ea3605067df765--