Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88196 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73439 invoked from network); 14 Sep 2015 21:22:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2015 21:22:44 -0000 Authentication-Results: pb1.pair.com header.from=mailto.woden@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mailto.woden@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: mailto.woden@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:35414] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/44-48700-2AA37F55 for ; Mon, 14 Sep 2015 17:22:43 -0400 Received: by lbpo4 with SMTP id o4so74690518lbp.2 for ; Mon, 14 Sep 2015 14:22:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=1oVCHwhWeY1bM94KrOG66rnsBr2X/oZ1M9TlleE7Kfo=; b=P1lyzxiZODAgIiDuALwooCXOIfhijHU76+VXOKS1YDqxm5sYgsDqMAuuyI+legEh/i Gcar46Dj2CoVMZCAEwh+A5cuDqXL2D5NZ1L0XExVJrJd0eKoytUwrP7L2/1EFmiLAYtP 42LdmIxBORPlIW71VNbBRG8Evwv/0/JCgIlh+jW4xFGWm/K8AFvqKWyRfKmkuEqzEerF pH90kn+y3LM3oLCDVjpTgaTRK3ru56nEIsoMrfBpdHzbliEiQLNPAI38zmFPcIhjXHI3 EurWzfwddrrBiIcHntrj8m6Ux3D5PiSTPUsglJ326RI2I2wssx67npdmL0y67UOolW3d NuuA== MIME-Version: 1.0 X-Received: by 10.112.150.233 with SMTP id ul9mr11970364lbb.91.1442265759919; Mon, 14 Sep 2015 14:22:39 -0700 (PDT) Received: by 10.114.78.231 with HTTP; Mon, 14 Sep 2015 14:22:39 -0700 (PDT) Date: Mon, 14 Sep 2015 23:22:39 +0200 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=047d7b342f6c4ab5b8051fbbaa4a Subject: Suggestion: Adding PUT, PATCH and DELETE From: mailto.woden@gmail.com (Daniel Persson) --047d7b342f6c4ab5b8051fbbaa4a Content-Type: text/plain; charset=UTF-8 Hi. I've not been a member for too long so I might have missed if this have been discussed earlier. But I've created a small PR to the basic request handling to support PUT, PATCH and DELETE. https://github.com/php/php-src/pull/1519 Summary: Added support for request methods with the smallest change possible. History: HTTP 1.0 had only support for GET, POST and HEAD. In June of 1999 HTTP 1.1 added the verbs PUT and DELETE and later in 2010 RFC5789 (https://tools.ietf.org/html/rfc5789) added PATCH. Pull request explaination: In this pull request I try to add put, patch and delete with changing as few functions as possible. I simply handle the new verbs as POST. As defined in HTTP 1.1 they are similar in input data requirements and differ only in usage. More work I could do is add new globals for $_PUT, $_PATCH and $_DELETE but I think this might be more confusing. Or we could move from $_POST to a new global not tied to a verb. Example $_PARSED_INPUT --047d7b342f6c4ab5b8051fbbaa4a--