Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88197 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75476 invoked from network); 14 Sep 2015 21:38:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2015 21:38:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=derokorian@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=derokorian@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: derokorian@gmail.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:37674] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/A4-48700-E5E37F55 for ; Mon, 14 Sep 2015 17:38:39 -0400 Received: by wicfx3 with SMTP id fx3so2545997wic.0 for ; Mon, 14 Sep 2015 14:38:36 -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; bh=Tuev0+ly7XVBcGRFQ5B2Qk89woyT0GI2c7tiqrPno4Q=; b=LSXNCmevg9n6JL6Wrs9yMf6Ii3NjEqMj240RHjOvwg1CMTHX9w+TSai/tjh1xrnq4h HYUf8iJmhQL35KvMZUrYkvPlHEnvUlXFNTOHXtlG73q2fXOFDxPGM9NlmqWe/a6ZgyO1 eaAsFMYrnyuDalwddj3ewVwwnLpCWWiIQXL+k2unuGvlVhYKqaSSPLOtqT9QEjBOUuxL Dw6oxy8/5ysqcfZfDGmoelwUg6YeFQgC5eIorhfRRq5262f/20BdgjnNC48yP2tYcR2o xkJr4QvaO62JkvGn4xOHMkbX4wakKDYWIMZ0lo/ntQO7n+9zVpftHC7Q/ARlwVNbk3P1 eRGw== MIME-Version: 1.0 X-Received: by 10.181.13.102 with SMTP id ex6mr255545wid.64.1442266716021; Mon, 14 Sep 2015 14:38:36 -0700 (PDT) Received: by 10.28.183.130 with HTTP; Mon, 14 Sep 2015 14:38:35 -0700 (PDT) In-Reply-To: References: Date: Mon, 14 Sep 2015 15:38:35 -0600 Message-ID: To: Daniel Persson Cc: PHP Internals Content-Type: multipart/alternative; boundary=f46d0438933547a835051fbbe351 Subject: Re: [PHP-DEV] Suggestion: Adding PUT, PATCH and DELETE From: derokorian@gmail.com (Ryan Pallas) --f46d0438933547a835051fbbe351 Content-Type: text/plain; charset=UTF-8 On Mon, Sep 14, 2015 at 3:22 PM, Daniel Persson wrote: > 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. > +1 from me, would love to see the verbs supported more fully. (though my approval means quite literally nothing). How does this affect something like the ini settings for variable order? IE. does GPC change from GET -> POST -> COOKIE to GET -> PARSED_INPUT -> COOKIE? Since only a single verb is available for any single request, this makes the most sense for me. > > 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 As for having a new $_PARSED_INPUT, I'm not sure I like this for 2 reasons a) the name is 2 words, all other super globals are single words (unless there's one I do not know of) and b) It feels like too long a name, sure in an IDE it will auto-complete for us, but for quick edits in vim for example, this name would suck. But my only problem with it is on a name level, about about just $_INPUT or does this seem to conflict with $_REQUEST which holds multiple super globals worth of data already. --f46d0438933547a835051fbbe351--